FUNCTION Go_On Print,'Press any key to go on' k=Get_Kbrd(1) Return,(StrUpCase(k) NE 'Q') END ;+ ; NAME: ; CalComp ; PURPOSE: ; Comparison of calibration images from different dates ; CATEGORY: ; Data validation ; CALLING SEQUENCE: ; CalComp, File1, File2 [, Dark1 = dfile1, Dark2 = dfile2 ] ; INPUTS: ; File1: The name (only; no path required) of the (presumed valid) ; calibration image file. ; File2: The name (only; as above) of another calibration image ; file acquired with the same camera, filter, and exposure ; time. ; OPTIONAL INPUTS: ; None. ; KEYWORD PARAMETERS: ; Dark1: If supplied, gives the name of the appropriate dark ; frame to subtract from the image of File1. ; Dark2: As above, for File2. ; OUTPUTS: ; None. ; OPTIONAL OUTPUTS: ; None. ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; The specified files are opened and read. Various plots are ; created on the screen. ; RESTRICTIONS: ; The specified files must exist, and contain valid data. ; PROCEDURE: ; Fairly straightforward, except the statistical calculations at ; the end, for which references are given. ; EXAMPLE: ; ; SEE ALSO: ; ; MODIFICATION HISTORY: ; Written by: DPSteele, ISAS, June 4, 1996. ;- PRO CalComp,file1,file2,dark1=dk1,dark2=dk2 @isitdos IF !D.Window NE -1 THEN WDelete,!D.Window path=iroot+dd+imagetype(2)+dd cam=StrMid(file1,3,1) filt=StrMid(file1,4,1) time=StrMid(file1,5,3) mismatch=(cam NE StrMid(file2,3,1)) OR $ (filt NE StrMid(file2,4,1)) OR $ (time NE StrMid(file2,5,3)) IF mismatch THEN Message,'Image file mismatch' path=path+cc+cam+dd+ff+filt+dd Help,path IF NOT Go_On() THEN Return IF (N_Elements(dk1) GT 0) OR (N_Elements(dk2) GT 0) THEN BEGIN dpath=iroot+dd+imagetype(3)+dd+cc+cam+dd Help,dpath IF NOT Go_On() THEN Return ENDIF RdKImg,path+file1,hb1,im1 RdKImg,path+file2,hb2,im2 h1=GetHd(hb1) h2=GetHd(hb2) Print,'Image 1:' Help,/St,h1.misc.dt Help,/St,h1.misc.tm Print,'Image 2:' Help,/St,h2.misc.dt Help,/St,h2.misc.tm IF NOT Go_On() THEN Return sim1=StdSize(im1) sim2=StdSize(im2) IF N_Elements(dpath) GT 0 THEN BEGIN IF N_Elements(dk1) EQ 0 $ THEN RdMeanDk,Fix(cam),Fix(time),dim1,/NoInteractive $ ELSE RdKImg,dpath+dk1,dhb1,dim1 dim1=StdSize(dim1) sim1=(sim1-dim1)>0 IF N_Elements(dk2) EQ 0 $ THEN RdMeanDk,Fix(cam),Fix(time),dim2,/NoInteractive $ ELSE RdKImg,dpath+dk2,dhb2,dim2 dim2=StdSize(dim2) sim2=(sim2-dim2)>0 ENDIF pc1=Pcentile(sim1,[0.01,0.99]) pc2=Pcentile(sim2,[0.01,0.99]) Print,'Image 1 in standard size: 1st and 99th percentiles' Print,pc1 Print,'Image 2 in standard size: 1st and 99th percentiles' Print,pc2 Window,0,XSize=512,YSize=512 TVScl,sim1>pc1(0)pc2(0)pc2(0)pc2(0)(meanrat-sdrat)<(meanrat+sdrat) $ ,80,80,175,175,CTable=0 ; WDelete,0 Return END