frame_block_expand_flag¶
- sofia_redux.scan.integration.integration_numba_functions.frame_block_expand_flag(sample_flags, valid_frames, flag, block_size, channel_indices)[source]¶
If a single frame is flagged in a block, flag all frames in the block.
A block is a division of the entire frame space into chunks of size
block_size
. If any frame for a given channel is flagged asflag
, all frames in that block for the channel will also be flagged asflag
.- Parameters:
- sample_flagsnumpy.ndarray (int)
The frame sample flags of shape (n_frames, n_channels).
- valid_framesnumpy.ndarray (bool)
A boolean mask of shape (n_frames,) where
True
indicates that a frame may be included in any calculations.- flagint
The flag to check and expand.
- block_sizeint
The size of the “block” or the number of frames in a single division of the entire frame space.
- channel_indicesnumpy.ndarray (int)
The channel indices to check.
- Returns:
- None