function fig = plot_aperture_distr(X,Y,E,a_pos,flagged)
    fig = figure;
    pcolor(X,Y,10*log10(abs(E)));
    title('Aperture Image, Magnitude in dB');
    shading flat
    axis equal
    axis([-20,20,-20,20]);
    caxis([-20,0])
    xlabel('East/m');
    ylabel('North/m');
    hold on
    plot(a_pos(:,1),a_pos(:,2),'o','Color','black','MarkerSize',10,'LineWidth',1.5);
    for k = 1:length(flagged)
        u = flagged(k);
        plot(a_pos(u,1),a_pos(u,2),'x','Color','black','MarkerSize',10,'LineWidth',1.5);
    end
    cb = colorbar;
    cb.TickLabelInterpreter = 'latex';
    axis tight
end

