get_weighted_timestream

sofia_redux.scan.integration.integration_numba_functions.get_weighted_timestream(sample_data, sample_flags, frame_valid, frame_weights, channel_indices)[source]

Given sample data and flags, return weighted values, and full weights.

The output data will only contain certain channel indices and contains values of sample_data * frame_weights. Invalid frames or nonzero sample flags will result in zero weights and data in the output arrays.

Parameters:
sample_datanumpy.ndarray (float)

Sample data of shape (n_frames, n_channels)

sample_flagsnumpy.ndarray (int)

Sample flags of shape (n_frames, n_channels)

frame_validnumpy.ndarray (bool)

A boolean mask of shape (n_frames,) where True indicates a valid frame.

frame_weightsnumpy.ndarray (float)

An array of frame weights of shape (n_frames,).

channel_indicesnumpy.ndarray (int)

The channel indices to include in the output arrays.

Returns:
data, weightnumpy.ndarray (float), numpy.ndarray (float)

The data and weight arrays of shape (n_frames, channel_indices.size).