despike_multi_resolution

sofia_redux.scan.integration.integration_numba_functions.despike_multi_resolution(timestream_data, timestream_weight, sample_flags, channel_indices, frame_valid, level, spike_flag, max_block_size)[source]

A Numba function to despike frame samples using multi-resolution method.

This is a fast implementation of the despiking resolution method. Please see despike_multi_resolution for a detailed explanation.

Parameters:
timestream_datanumpy.ndarray (float)

The time-stream data of shape (n_frames, channel_indices.size) containing sample_data * relative_weight values. Invalid samples have 0 values.

timestream_weightnumpy.ndarray (float)

The time-stream weights of shape (n_frames, channel_indices.size) containing relative_weight values. Invalid samples have 0 values.

sample_flagsnumpy.ndarray (int)

The sample flags of shape (n_frames, n_channels).

channel_indicesnumpy.ndarray (int)

The channel indices for which to perform the despiking. An array of shape (channel_indices.size,).

frame_validnumpy.ndarray (bool)

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

levelfloat

The sigma level above which spike flagging occurs.

spike_flagint

The spike flag integer identifier.

max_block_sizeint

The maximum block size which determines the minimum resolution. This should be no larger than n_frames // 2 and no smaller than 1.

Returns:
n_flaggedint

The number of samples flagged as spikes.