get_one_over_f_stat

sofia_redux.scan.channels.channel_numba_functions.get_one_over_f_stat(weights, one_over_f_stats, flags)[source]

Return the total channel 1/f statistic.

The 1/f statistic is given as:

f1_stat = sqrt(sum(w * f^2) / sum(w))

where w are the channel weights and f are the channel 1/f statistics.

Parameters:
weightsnumpy.ndarray (float)

The channel weights of shape (n_channels,).

one_over_f_statsnumpy.ndarray (float)

The channel 1/f statistics of shape (n_channels,).

flagsnumpy.ndarray (int)

The channel flags of shape (n_channels,). Only zero-valued flags will be included in the calculations.

Returns:
f1_statfloat