stack_c2nc2¶
- sofia_redux.instruments.forcast.stack.stack_c2nc2(data, header, variance=None, bglevel=None, extra=None)[source]¶
Run the stacking algorithm on C2NC2 data
Calculates the chop-subtracted frames. For frame i (in steps of 2), the resulting chop-subtracted frame would be:
chop = frame[i] - (frame[i+1] * bgscale[i]/bgscale[i+1])
chop frames are then summed
- Parameters:
- datanumpy.ndarray
(npos, nrow, ncol)
- headerastropy.io.fits.header.Header
FITS header to update with HISTORY messages
- variancenumpy.ndarray, optional
variance array to propagate (npos, nrow, ncol)
- bglevelarray_like, optional
should be of length npos
- extradict, optional
- If set will be updated with:
- chopsub -> numpy.ndarray (npos / 2, nrow, ncol)
chop-subtracted data
- chopsub_var -> numpy.ndarray (npos / 2, nrow, ncol)
propagated chop-subtracted variance
- Returns:
- 2-tuple
numpy.ndarray : The stacked data array (nrow, ncol) numpy.ndarray : The propagated variance array (nrow, ncol)