process_extension¶
- sofia_redux.instruments.fifi_ls.fit_ramps.process_extension(hdu, readout_range, threshold=5, s2n=10, remove_first=None, subtract_bias=True, badmask=None, average_ramps=True, posdata=None, indpos_sigma=3.0)[source]¶
Wrapper to process a single HDU extension.
- Parameters:
- hduImageHDU
input HDU extension
- readout_rangearray_like of int
(start readout, ramplength)
- thresholdfloat, optional
Robust rejection threshold (in sigma) for combining slopes of individual ramps.
- s2nfloat, optional
Signal-to-noise below which data will be considered questionable and will be ignored. Set <= 0 to turn off signal-to-noise filtering.
- remove_firstbool, optional
if True, remove the first two ramps prior to fitting
- subtract_biasbool, optional
If True, subtract the value of the empty zeroth pixel for each spaxel prior to fitting.
- badmasknumpy.ndarray, optional
(npoints, (spexel, spaxel)) array specifying indices of bad pixels
- average_rampsbool, optional
If set, data is averaged over ramps (default). If not, all ramps are returned, as appropriate for OTF mode data, for which each ramp is at a different sky position.
- posdatafits.Table, optional
OTF scan position data table. If provided and
average_ramps
is set to False, then the input DLAM_MAP and DBET_MAP for each readout are averaged over each ramp; the FLAG key is and-ed over the ramp. The UNIXTIME for the first and last retained ramps are averaged and added to the header as RAMPSTRT and RAMPEND keywords, respectively.- indpos_sigmafloat, optional
If >0, will be used to discard samples with grating position that deviates from the expected INDPOS value by this many sigma.
- Returns:
- flux, stddevImageHDU, ImageHDU
Optionally, a third element may be returned: a BinTableHDU containing OTF position data, propagated from the
posdata
argument.