load_timestream¶
- sofia_redux.scan.filters.filters_numba_functions.load_timestream(frame_data, frame_weights, frame_valid, modeling_frames, channel_indices, sample_flags, timestream, points)[source]¶
Load timestream data from the supplied frame data.
The timestream data is defined as:
timestream = (d * w) - mean(d * w)
In addition, the points are also calculated at this stage as:
points = sum(w)
where d is the
frame_data
and w are theframe_weights
. This calculation occurs for each channel supplied inchannel_indices
. Only valid samples are included in the mean and sum operations, and equivalent timestream values for invalid samples will be set to zero on output. Invalid samples are those in which the frame is marked as invalid or a modeling frame, the frame data is NaN or sample flag is nonzero.- Parameters:
- frame_datanumpy.ndarray (float)
The frame data of shape (n_frames, all_channels).
- frame_weightsnumpy.ndarray (float)
The frame weights of shape (n_frames,).
- frame_validnumpy.ndarray (bool)
An array of shape (n_frames,) where
True
indicates that a frame is valid and may be included in the time stream.- modeling_framesnumpy.ndarray (bool)
A boolean mask where
True
marks a frame as a modeling frame, and will therefore not be included in the output timestream.- channel_indicesnumpy.ndarray (int)
The filter channel group indices, used to extract the correct channel information from the frame sample data.
- sample_flagsnumpy.ndarray (int)
The data sample flags of shape (n_frames, all_channels) where any non-zero value will not be included in the time-stream.
- timestreamnumpy.ndarray (float)
The data output array to populate. Should be of shape (n_channels, n_frames) where n_frames is the number of integration frames, and n_channels is the number of channels in the filter channel group.
- pointsnumpy.ndarray (float)
The sum of valid frame weights for each channel. Should be of shape (n_channels,) where n_channels is the number of channels in the filter channel group. Will be updated in-place.
- Returns:
- None