function phase_plot_out

%%This file will attempt to open up see.out and phase.out and plot the
%%phase screen

%Ax=zeros(256,256);
%Ay=zeros(256,256);

name='A';

see_x_name=strcat('see','.x');
see_y_name=strcat('see','.y');

see_total_x=load(see_x_name);
see_total_y=load(see_y_name);

for i=1:256
    for j=1:256
        see_x(i,j)=see_total_x(j+256*(i-1));
        see_y(i,j)=see_total_y(j+256*(i-1));
    end
end

quiver(see_x,see_y);
axis([0 50 0 50]);

figure;
hold on;

magnitude=sqrt(see_x.^2+see_y.^2);
max=max(max(magnitude))
min=0;
number_of_squares=170;

for i=1:number_of_squares
    for j=1:number_of_squares
        x=[i-1 ; i-1; i ;i  ;i-1];
        y=[j-1 ; j  ; j ;j-1; j-1];
        color=magnitude(j+(i-1)*256)/max;        
        b=fill(x,y,[0,color,color]);
        set(b,'EdgeColor',[0,color,color]);
        axis([0 170 0 170]);
    end
end

colorbar;




