pro get_mdark,testlog,cc_dark,cc_bias,ms_time ; v2 11/9/4 changes the call list from v1 ;This subprogram will produce a polynimial fit to the mean dark of the covered columns ;and the BSR that can be used to make SA dark predicted values in the main program. ;1/14/05 Removed lamp dependance on dark covered column fit. Goes until end of mission. @c_system.inc @c_header.inc cbias=8.9 spfratio=(0.976/8.384) cd,testlog files=t_getfil() fn = sort(strmid(files,13,13)) s=size(files) numfiles=0 if s(0) ne 0 then numfiles=s(1) bias=fltarr(s(1)) mtime=fltarr(s(1)) darkcc=fltarr(s(1)) meand=fltarr(s(1)) j=0 ;Data sets have to be of a particular kind, i.e. Dark data sets (type), Lamps off, and all ;the same exposure time (you may have to adjust expt). ex. 10ms for Realistic_descent_7Aug96.1 for i=0,numfiles-1 do begin d_read,files(fn(i)),h,p type=d_value(h,H_MEAS_TYPE) if (type eq 18) then begin ; lamp=d_value(h,H_LAMP_STATE) ; ; if (lamp eq '0000') then begin expt= d_value(h,H_EXPTIME) if (expt eq 10.0000) then begin s=size(p) nadd=s(1) meand(j)=mean(p)*(nadd/4.0) mtime(j)=d_value(h,H_MISSION_TIME) tbias=((float(d_value(h,H_NULL_PIXEL2))/4.0+0.125)+(float(d_value(h,H_NULL_PIXEL3))/4.0+0.125))/2.0 bias(j)=tbias darkcc(j)=meand(j) - bias(j) > 0.00001 j=j+1 endif ; endif endif endfor cc_dark=fltarr(j) ms_time=fltarr(j) cc_bias=fltarr(j) cc_dark=darkcc(0:j-1) ms_time=mtime(0:j-1) cc_bias=bias(0:j-1) stop return end