whiten_profile

sofia_redux.scan.filters.filters_numba_functions.whiten_profile(amplitudes, amplitude_weights, profiles, channel_profiles, white_from, white_to, filter_level, significance, one_over_f_bin, white_noise_bin, channel_indices)[source]

Fast implementation of the whiten_profile method.

Parameters:
amplitudesnumpy.ndarray (float)

An array of spectrum amplitudes of shape (n_channels, nf).

amplitude_weightsnumpy.ndarray (float)

An array of the spectrum amplitude weights derived during calc_mean_amplitudes of shape (n_channels, nf).

profilesnumpy.ndarray (float)

The profiles working array of shape (n_channels, nf). Will be be overwritten during this process.

channel_profilesnumpy.ndarray (float)

The filter profile for each channel of shape (n_channels, nf). Will be updated with the new relative profile changes.

white_fromint

The filtering start frequency channel.

white_toint

The non-inclusive end filtering frequency channel.

filter_levelfloat

The filtering level active as a DC offset, above which to apply the whitening filter.

significancefloat

The maximum deviation of the amplitude. Whitening will be applied above this level.

one_over_f_binint

The index of the 1/f frequency channel bin.

white_noise_binint

The index of the white noise frequency bin.

channel_indicesnumpy.ndarray (int)

The channel indices for which to apply the whitening.

Returns:
channel_one_over_f_statnumpy.ndarray (float)

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