level

sofia_redux.scan.integration.integration_numba_functions.level(frame_data, frame_weights, frame_valid, modeling_frames, sample_flags, channel_indices, start_frame, stop_frame, offset, offset_weight, frame_dependents, channel_filtering)[source]

Subtract an offset per channel from the frame data between given frames.

The frame dependents will also be updated by this operation.

Parameters:
frame_datanumpy.ndarray (float)

The frame data of shape (n_frames, all_channels). Will be updated in-place.

frame_weightsnumpy.ndarray (float)

The frame weights of shape (n_frames,).

frame_validnumpy.ndarray (bool)

A boolean mask of shape (n_frames,) where False excludes a frame from all processing.

modeling_framesnumpy.ndarray (bool)

A boolean mask of shape (n_frames,) where True marks a flag as a modelling frame which will not be included when determining the mean.

sample_flagsnumpy.ndarray (int)

The frame data flag mask of shape (n_frames, all_channels) where any non-zero value excludes a sample from inclusion in the mean calculation.

channel_indicesnumpy.ndarray (int)

The channel indices for which to calculate the mean of shape (n_channels,).

start_frameint

The start frame from which to calculate the mean. The default is the first frame (0).

stop_frameint

The stop frame (non-inclusive) at which to terminate the mean calculation. The default is the total number of frames (n_frames).

offsetnumpy.ndarray (float)

The offsets of shape (n_channels,) to remove from frame data between the start and stop frame for the given channels.

offset_weightnumpy.ndarray (float)

The offset weights of shape (n_channels,) used to update the frame dependents.

frame_dependentsnumpy.ndarray (float)

The frame dependents of shape (n_frames,). Will be updated in-place.

channel_filteringnumpy.ndarray (float)

The channel filtering factor of shape (n_channels,).

Returns:
None