despike_gradual

sofia_redux.scan.integration.integration_numba_functions.despike_gradual(frame_data, sample_flags, channel_indices, frame_weight, frame_valid, channel_level, spike_flag, source_blank_flag, exclude_flag, channel_gain, depth)[source]

A Numba function to despike frame samples using gradual method.

This is a fast implementation of the despiking gradual method. Please see despike_gradual for a detailed explanation.

Parameters:
frame_datanumpy.ndarray (float)

The frame data of shape (n_frames, n_channels).

sample_flagsnumpy.ndarray (int)

The sample flags of shape (n_frames, n_channels).

channel_indicesnumpy.ndarray (int)

The channel indices to despike of shape (n_channel_indices,).

frame_weightnumpy.ndarray (float)

The frame relative weights of shape (n_frames,).

frame_validnumpy.ndarray (bool)

A boolean mask indicating whether a frame is valid (True). Invalid frames are not included.

channel_levelnumpy.ndarray (n_channel_indices,).

An array containing a value for each channel indicating the maximum noise level.

spike_flagint

The integer flag specifying a spike.

source_blank_flagint

The integer flag specifying a blank source.

exclude_flagint

The integer flag specifying a sample that should not be included in the despiking.

channel_gainnumpy.ndarray (float)

An array of channel gains with shape (n_channel_indices,).

depthfloat

A factor between 0 and 1 that defines the maximum allowable data value as a fraction of the maximum channel gain.

Returns:
number_flaggedint