resize_data¶
- sofia_redux.instruments.fifi_ls.fit_ramps.resize_data(data, readout_range, indpos, remove_first_ramps=True, subtract_bias=True, indpos_sigma=3.0)[source]¶
Trim and reshape data to separate ramps.
- Parameters:
- datanumpy.ndarray
(1 [optional], nramps, nwave (18), nspaxel (26))
- readout_rangearray_like of int
(start readout, ramp length)
- indposint
Expected inductosyn position for the grating
- remove_first_rampsbool, optional
Remove the first two ramps.
- subtract_biasbool, optional
Subtract the empty pixel value.
- indpos_sigmafloat, optional
If >0, will be used to flag ramps with mean grating position that deviates from the indpos value by this many sigma, or has a standard deviation greater than this value. Flags are returned in the bad_ramps array.
- Returns:
- data, bad_rampsnumpy.ndarray, numpy.ndarray
Resized data is a floating point array with dimensions (ramps/spaxel, ramplength, nwave (16), nspaxel (25)). The secondary array is a Boolean array with dimensions (ramps/spaxel), containing bad ramp flags (True = bad) for later propagation in ramp fits.