imgnonlin¶
- sofia_redux.instruments.forcast.imgnonlin.imgnonlin(data, header, siglev=None, variance=None)[source]¶
Corrects for non-linearity in detector response due to general background.
The header must contain the information to determine the camera. If siglev is not passed, the header must also contain a keyword (NLINSLEV) to indicate the background level and size of the section used to calculate the level. In practice, this means that sofia_redux.instruments.forcast.background should be run first to calculate the background level.
- Parameters:
- datanumpy.ndarray
Input data array (nimage, nrow, ncol)
- headerastropy.io.fits.header.Header
Input FITS header. Will be updated with a HISTORY message
- siglevarray_like, optional
Background level. There should be a single value for each input frame
- variancenumpy.ndarray, optional
Variance array (nimage, nrow, ncol) to update in parallel with the data frame.
- Returns:
- numpy.ndarray, numpy.ndarray
The linearity corrected array (nimage, nrow, ncol) or (nrow, ncol) The propagated variance array (nimage, nrow, ncol) or (nrow, ncol)