prepare_frame_temp_fields¶
- sofia_redux.scan.signal.signal_numba_functions.prepare_frame_temp_fields(signal_values, frame_weights, frame_valid, frame_modeling, frame_c, frame_wc, frame_wc2)[source]¶
Populate some temporary parameters for signal numerical operations.
Populates the following parameters:
frame_c = signal_values frame_wc = frame_weights * signal_values frame_wc2 = frame_weights * signal_values^2
Any NaN signal values or invalid frames result in zeros in all arrays to be populated. NaN or negative frame weights or modeling frames result in zero valued weight properties for that same frame (in
frame_wc
andframe_wc2
).- Parameters:
- signal_valuesnumpy.ndarray (float)
The signal values of shape (n_frames,).
- frame_weightsnumpy.ndarray (float)
The frame relative weights of shape (n_frames,).
- frame_validnumpy.ndarray (bool)
A boolean mask of shape (n_frames,) where
False
marks a frame as invalid.- frame_modelingnumpy.ndarray (bool)
A boolean mask of shape (n_frames,) where
True
marks a frame as a modeling frame (zero weight).- frame_cnumpy.ndarray (float)
The signal array to populate of shape (n_frames,). Updated in-place.
- frame_wcnumpy.ndarray (float)
The wc (frame_weight * signal) array to populate of shape (n_frames,). Updated in-place.
- frame_wc2numpy.ndarray (float)
The wc2 (frame_weight * signal^2) array to populate of shape (n_frames,). Updated in-place.
- Returns:
- None