PRO combine_sbcflt ; combine all FF images for a given filter ; ; F15OLP + coronograph (image stability data) ; fildat = 'f150lp_coron.dat' ; imageout = 'f150lp_coron.fits' ; idval = indgen(108) + 4691 ; ; F15OLP + coronograph (all image stability data) fildat = 'f150lp_coron2.dat' imageout = 'f150lp_coron2.fits' idval = [indgen(108) + 4691, indgen(14) + 4969, indgen(28) + 5778] ; ; F14OLP (A: first iteration) ; fildat = 'f140lp_a.dat' ; imageout = 'f140lp_a.fits' ; idval = indgen(12) + 4805 ; ; F165LP ; fildat = 'f165lp.dat' ; imageout = 'f165lp.fits' ; idval = [indgen(7) + 4817,indgen(4) + 4825] ; ; F122M ; fildat = 'f122m.dat' ; imageout = 'f122m.fits' ; idval = indgen(14) + 4830 ; ; F150LP ; fildat = 'f150lp.dat' ; imageout = 'f150lp.fits' ; idval = indgen(12) + 4844 ; ; F125LP ; fildat = 'f125lp.dat' ; imageout = 'f125lp.fits' ; idval = indgen(12) + 4863 ; ; F115LP ; fildat = 'f115lp.dat' ; imageout = 'f115lp.fits' ; idval = indgen(12) + 4876 ; ; PR130L ; ; fildat = 'pr130l.dat' ; imageout = 'pr130l.fits' ; idval = indgen(11) + 4889 ; ; PR110L ; ; fildat = 'pr110l.dat' ; imageout = 'pr110l.fits' ; idval = indgen(11) + 4901 ; ; F140LP (B: second iteration all frames) ; ; fildat = 'f140lp_b.dat' ; imageout = 'f140lp_b.fits' ; idval = indgen(11) + 4913 ; ; F140LP (B: second iteration: only FW3 pos = 1440) ; ; fildat = 'f140lp_b1.dat' ; imageout = 'f140lp_b1.fits' ; idval = indgen(4) + 4913 ; ; F140LP (B: second iteration: only FW3 pos = 1441) ; ; fildat = 'f140lp_b2.dat' ; imageout = 'f140lp_b2.fits' ; idval = indgen(3) + 4917 ; ; F140LP (B: second iteration: only FW3 pos = 1439) ; ; fildat = 'f140lp_b3.dat' ; imageout = 'f140lp_b3.fits' ; idval = indgen(4) + 4920 ; ; deep Kr splat ; ; fildat = 'krsplat.dat' ; imageout = 'krsplat.fits' ; idval = indgen(4) + 4949 ; ; F115LP spectralon flat ; fildat = 'f115lp_s.dat' ; imageout = 'f115lp_s.fits' ; idval = indgen(11) + 5807 ; ; F115LP spectralon flat ; fildat = 'f115lp_s1.dat' ; imageout = 'f115lp_s1.fits' ; idval = indgen(4) + 5807 ; ; F115LP spectralon flat ; fildat = 'f115lp_s2.dat' ; imageout = 'f115lp_s2.fits' ; idval = indgen(4) + 5811 ; ; F115LP spectralon flat ; fildat = 'f115lp_s3.dat' ; imageout = 'f115lp_s3.fits' ; idval = indgen(3) + 5815 ; ; F115LP internal D2 flat ; fildat = 'f115lp_d2.dat' ; imageout = 'f115lp_d2.fits' ; idval = [4954, indgen(6) + 4962] ; ; nid = n_elements(idval) - 1 expstart = 0.0*idval exptime = 0.0d0*idval sbctemp = 0.0d0*idval rate = 0.0d0*idval nhot = 0*idval dsum = fltarr(1024,1024) badrate = 0.54 ; twice max safe global ct rate averaged per pixel openw,1,fildat dbopen,'acs_log' printf,1,' ID FILTER3 Date time texp Tsbc mglobal nhot' print,' ID FILTER3 Date time texp Tsbc mglobal nhot' FOR i = 0, nid DO BEGIN acs_read,idval[i],h,d sbctemp[i] = sxpar(h,'sbctemp') mjd = float(dbval(idval[i],'expstart')) mjd_to_date,mjd,doy,date datestr = date_conv(date,'s') expstart[i] = date exptime[i] = sxpar(h,'exptime') filt3 = sxpar(h,'filter3') good = where(d LT ((badrate*exptime[i]) > 5), ngood) rate[i] = total(d(good))/exptime[i] nhot[i] = n_elements(d) - ngood dsum = dsum + d print,idval[i],filt3,datestr,exptime[i],sbctemp[i],$ rate[i],nhot[i],format='(i5, 2x, a7, 2x, a24, f7.0, f7.2, f10.2,i5)' printf,1,idval[i],filt3,datestr,exptime[i],sbctemp[i],$ rate[i],nhot[i],format='(i5, 2x, a7, 2x, a24, f7.0, f7.2, f10.2,i5)' end texpsum = total(exptime) tempsbcavg = total(exptime*sbctemp)/texpsum good = where(dsum LT ((badrate*texpsum) > 5), ngood) avg = total(dsum(good))/ngood dsum = dsum / avg print,' ' print,' Total exposure time = ',texpsum print,' Weighted SBC temp = ',tempsbcavg print,' Average exposure lev= ',avg printf,1,' ' printf,1,' Total exposure time = ',texpsum printf,1,' Weighted SBC temp = ',tempsbcavg printf,1,' Average exposure lev= ',avg fits_write,imageout,dsum,h dbclose close,1 END