pro cormass2,list ; ;procedure to pre-process CorMASS 'differenced' images to correct for reset ;voltage decay effects seen in NICMOS3 images. This effect is not subtraced ;out through differencing. This is our so-called 'magic subtraction 2' ;technique. ; ;inputs: list: filename of file that contains listing of ; full filenames (i.e. /chaser/iraf/...) ; that contain differenced FITS format files ; to be corrected. ; ;calls: magicsub2 ; ;written by: John C. Wilson ; Cornell Univ. ; ;date: Mar 00 ; on_error,1 nl=numlines(list) ;find number of files print,'nl: ',nl files=strarr(nl) openr,lun,list,/get_lun readf,lun,files free_lun,lun for i=0,nl-1 do begin oldim=readfits(files[i],hdr) d=size(oldim,/N_DIMENSIONS) if d GT 0 then begin magicsub2,oldim,procim sxaddhist,'Reset Decay Corrected w/ MagSub2',hdr,/PDU name=str_sep(files[i],'.',/REMOVE_ALL) newname=name[0]+'m.'+name[1] ;'m' signifies 'magic subtracted' writefits,newname,procim,hdr print,'wrote: ',newname endif endfor return end