;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Line-dependent integration time correction for HRI IR in Mode 5 (ALTFF) ;;; ;;; Keywords: ;;; ;;; MODE LONG, HRI IR instrument mode (1-7) ;;; - if not present, keyword FITSHDR will be used ;;; ;;; FITSHDR STRING[], FITS header, for searching for MODE via SXPAR ;;; - ignored if MODE is used ;;; - mode keyword is IMGMODE ;;; ;;; Return value: ;;; ;;; ***N.B. UNITS of return value is ms (milliseconds) ;;; ;;; IF mode is 5, THEN return an array DOUBLE[512,256] containing ;;; offsets to be ADDED to the nominal integration time ;;; ;;; ELSE return scalar zero (DOUBLE 0d0, i.e. no correction) ;;; ;;; Description: ;;; ;;; HRI IR data pixel taken in Mode 5 (ALTFF) have line-dependent ;;; integration times which vary by 46ms from the first row to the ;;; last row, decreasing with increasing row. This function implements ;;; that variation as an offset to be added to the nominal integration. ;;; time, typically keyword INTTIME. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; function dicalir_varinttime, mode=modeArg, fitsHdr=fitsHdr mode = n_elements(modeArg) eq 1L ? long(modeArg[0]) : SXPAR(fitsHdr,'IMGMODE') return $ , mode NE 5L $ ? 0d0 $ : ( replicate(-1d0,512) # (46d0 * (dindgen(256)-127.5d0) / 255d0) ) end