flagged_frames_per_channel

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

Return the total number of flagged frames per channel.

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_framesnumpy.ndarray (int)

An array of shape (channel_indices.size,) containing the number of frames flagged with flag.