flagged_channels_per_frame

sofia_redux.scan.integration.integration_numba_functions.flagged_channels_per_frame(sample_flags, flag, valid_frames, channel_indices)[source]

Return the total number of flagged channels per frame.

Parameters:
sample_flagsnumpy.ndarray (int)

The sample flags of shape (n_frames, n_channels).

flagint

The flag to check.

valid_framesnumpy.ndarray (bool)

A boolean mask of shape (n_frames), where True indicates a valid frame that may be included in the calculations.

channel_indicesnumpy.ndarray (int)

The channel indices for which to calculate the number of flagged frames of shape (channel_indices.size,).

Returns:
flagged_channelsnumpy.ndarray (int)

An array of shape (n_frames,) containing the number of channels flagged with flag.