%% load data
clear all
fn_data = 'Fig4.mat';
data = load(fn_data);

freq_sel = data.freq_sel;
x = data.x;
y = data.y;
prs = data.prs;

%% Obstacles
phi = linspace(0, 2*pi, 1e2).';
rho_circ = 90/1e3;
x_circ = rho_circ .* cos(phi);
y_circ = rho_circ .* sin(phi) + 90/1e3;


%%
for i = 1:length(freq_sel)
    figure;
    pcolor(x/1e3, y/1e3, prs{i}.');
    clb = colorbar;
    colormap(JiaxinColor('vik'));
    shading interp
    pbaspect([720,600,1])

    rectangle('position', [-105, 0, 210, 185]/1e3 ,'facecolor', 'white', 'edgecolor', 'none');
    hold on
    plot(x_circ, y_circ, 'k', 'linewidth', 2)
    
    set(gca, 'xtick', [-360, -200, 0, 200, 360]/1e3)
    set(gca, 'fontsize', 22);
    xlabel('x (m)');
    ylabel('y (m)');
    xtickangle(0)
    
    switch freq_sel(i)
        case 125
            clim([0, 8e-2]);
        case 250
            clim([0, 6e-2]);
        case 500
            clim([0, 6e-2]);
        case 1e3 
            clim([0, 4e-2]);
        case 2e3
            clim([0,4e-2]);
        case 4e3
            clim([0, 6e-3]);
    end

end
