;Program to make plotting arrays (500,500) temp = lonarr(1) tlong = lonarr(1) avgc = lonarr(50) varc = lonarr(50) read, 'Insert the x coord of the top left corner pixel of the sub array (use an integer).',x read, 'Insert the y coord of the top left corner pixel of the sub array (use an integer).',y read, 'Insert the pixel size of the square sub array.',q q = long(q) print,q av = lonarr(q,q) vr = lonarr(q,q) ;stop x = long(x) y = long(y) ; ;Get the pixel element from the arrays FOR j = 0,49 DO BEGIN exp = 400*(j+1) favg = 'im' + string(exp) + '.avgc' favg = STRCOMPRESS(favg,/REMOVE_ALL) fvar = 'im' + string(exp) + '.varc' fvar = STRCOMPRESS(fvar,/REMOVE_ALL) openr,1,favg for k = 0,(q-1) do begin s = x + LONG(k) for l = 0,(q-1) do begin t = y + LONG(l) z = 4*(256L*t + s) POINT_LUN,1, z readu,1,temp av(k,l) = temp endfor endfor close,1 openr,1,fvar for k = 0,(q-1) do begin s = x + LONG(k) for l = 0,(q-1) do begin t = y + LONG(l) z = 4*(256L*t + s) POINT_LUN,1, z readu,1,tlong vr(k,l) = tlong endfor endfor close,1 ;print,tfloat,temp,j avgc(j) = LONG(total(av)/(q*q)) varc(j) = LONG(total(vr)/(q*q)) ENDFOR openw,1,'calib.pic' writeu,1,avgc writeu,1,varc close,1 plot,avgc,varc end