PRO sto2qlif,unitstring COMMON KI_image,header_bytes,CCD_image COMMON qlistuff,aflun,qlif,ql_times IF savqlimg() THEN BEGIN qlif_header=makqlifh(unitstring) cam=FIX(STRMID(qlif_header,0,1)) filt=FIX(STRMID(qlif_header,2,1)) exptype=STRMID(qlif_header,4,1) hour=FIX(STRMID(qlif_header,6,2)) exptime=FIX(ROUND(FLOAT(STRMID(qlif_header,18,5)))) lowlim=FIX(STRMID(qlif_header,23,6)) uplim=FIX(STRMID(qlif_header,31,6)) qli=REBIN(BYTSCL(CCD_image,MIN=lowlim,MAX=uplim),128,128) qli=[BYTE(qlif_header),REFORM(qli,16384,1)] IF exptype EQ 'D' $ THEN qlifnum=hour*14+cam*7+exptime/60 $ ELSE qlifnum=hour*14+cam*7+2+filt qlif(qlifnum)=qli ENDIF RETURN END