specparam.sim.transform.compute_rotation_frequency

specparam.sim.transform.compute_rotation_frequency(delta_exponent_b, f_rotation_b, delta_exponent_c, f_rotation_c)[source]

Calculate the rotation frequency between two rotated power spectra.

Parameters:
delta_exponent_bfloat

The applied change in exponent value for power spectrum ‘B’.

f_rotation_bfloat

The rotation frequency applied to power spectrum ‘B’.

delta_exponent_cfloat

The applied change in exponent value for power spectrum ‘C’.

f_rotation_cfloat

The rotation frequency applied to power spectrum ‘C’.

Returns:
float

The frequency rotation point between spectra ‘B’ & ‘C’.

Notes

Code Notes

This computes the rotation frequency for two power spectra ‘B’ & ‘C’, under the assumption that they are both rotated versions of a the same original power spectrum ‘A’.

Derivation

Given an original power spectrum A, then:

  • B = A*(f_rotation_b/freqs)^delta_exponent_b

  • C = A*(f_rotation_c/freqs)^delta_exponent_c

Therefore, what you want is f_rotation_bc, which is the frequency where B==C.

To find this, we can plug everything back into the equation, to find where B[freqs] == C[freqs], which is how we arrive at the solution below.

Examples

Calculate the rotation frequency between two transformed power spectra:

>>> f_rotation = compute_rotation_frequency(0.5, 25, -0.25, 10)

Examples using specparam.sim.transform.compute_rotation_frequency

Transforming Power Spectra

Transforming Power Spectra