despike_neighbouring

sofia_redux.scan.integration.integration_numba_functions.despike_neighbouring(frame_data, sample_flags, channel_indices, frame_weight, frame_valid, channel_level, delta, spike_flag, exclude_flag)[source]

A Numba function to despike frame samples using neighbour method.

This is a fast implementation of the despiking neighbour method. Please see despike_neighboring for a detailed explanation.

Parameters:
frame_datanumpy.ndarray (float)

The frame data of shape (n_frames, all_channels).

sample_flagsnumpy.ndarray (int)

The sample flags of shape (n_frames, all_channels).

channel_indicesnumpy.ndarray (int)

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

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 (float).

An array of shape (n_channels,) containing a value for each channel indicating the maximum noise level.

deltaint

The number of frames of separation defining a neighbour.

spike_flagint

The integer flag specifying a spike.

exclude_flagint

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

Returns:
number_flaggedint