% function box_vals(av, difs)
% 
% input: 
%   av is the average image
%   difs is the difference image
% output:
%   text to screen
%
% select region by clicking down at starting point with left mouse
%   button, then drag to ending position and release button

function box_vals(av,difs)

[x0,y0,nx,ny]=box_cursor;
avbox=av(y0:(y0+ny),x0:(x0+nx));
difbox=difs(y0:(y0+ny),x0:(x0+nx));
avm=mean(avbox(:));
dfm=mean(difbox(:));
sigav=std(avbox(:));
sigdif=std(difbox(:));
fprintf(1,'avm=%0.3f, sigav=%0.3f\n',avm,sigav);
fprintf(1,'dfm=%0.3f, sigdif=%0.3f\n',dfm,sigdif);
fprintf(1,'box=%d,%d,%d,%d\n',x0,y0,nx,ny);
