parameter i1 i2 nointer open input ./fields.lis stat n=count[input] string field {input} call {field}setup if wfpc==1 n=4 end_if if mosaic==1 n=8 end_if if i1==0 i1=1 i2=n else_if i2==0 i2=i1 end_if ! If this is a mosaic frame, do first pass over the binned summed images if mosaic==1 call {field}setup 1 do ifilt=1,nfilt string var 'nframe%i1' ifilt nf={var} do jf=1,nf string var 'name%i1%i2.2' ifilt jf string file '{{var}}' ifield rd 1 red/{file}s call prep 1 {file}s 2 call mscprep {file} end_do end_do end_if do ifield=1,n if ifield>=i1&ifield<=i2 if wfpc==1|mosaic==1 call {field}setup ifield else call {field}setup end_if do ifilt=1,nfilt string var 'nframe%i1' ifilt nf={var} do jf=1,nf string var 'name%i1%i2.2' ifilt jf string nim ' ' if wfpc==1 ! string file '{{var}}%i1' ifield string file '{{var}}' string nim 'nim=%i1' ifield else_if mosaic==1 string file '{{var}}_%i1' ifield else string file '{{var}}' end_if if archival==1 rd $ifield archive/{file}_c0f {pictype} {nim} headonly else rd $ifield red/{file} {pictype} {nim} headonly end_if err goto nocard strcmp {ifield:expflag} NORMAL if strcmpok~=1 printf '{gal} {field} {file}' >>/home/holtz/raw/archive/bad.lis end_if goto nextim nocard: printf '{gal} {field} {file}' >>/home/holtz/raw/archive/noflag.lis nextim: end_do end_do end_if if (wfpc==0&mosaic==0)&ifield