differential_channel_weights

sofia_redux.scan.integration.integration_numba_functions.differential_channel_weights(frame_data, relative_weights, sample_flags, valid_frames, channel_indices, frame_delta)[source]

Derive channel weights using the differential method.

Parameters:
frame_datanumpy.ndarray (float)

The frame data of shape (n_frames, all_channels).

relative_weightsnumpy.ndarray (float)

The frame weights of shape (n_frames,).

sample_flagsnumpy.ndarray (int)

The sample flags of shape (n_frames, all_channels). Any non-zero sample flags will be excluded from the calculations.

valid_framesnumpy.ndarray (bool)

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

channel_indicesnumpy.ndarray (int)

The channel indices for which to include in the calculations. Should be of shape (n_channels,) where n_channels < all_channels.

frame_deltaint

The differential frame offset.

Returns:
variance_sum, variance_weightnumpy.ndarray, numpy.ndarray

The channel variance sum (variance * weight) and channel variance weights, both of shape (n_channels,) and float type.