gw.conversion.spin_conversion.change_spin_conversion_phase

gw.conversion.spin_conversion.change_spin_conversion_phase(
    samples,
    f_ref,
    sc_phase_old,
    sc_phase_new,
    num_processes=1,
)

Change the phase used to convert cartesian spins to PE spins. The cartesian spins are independent of the spin conversion phase. When converting from cartesian spins to PE spins, the phase value has an impact on theta_jn and phi_jl.

The usual convention for the PE spins is to use the phase parameter for the conversion (cart. spins <–> PE spins), but for dingo-IS with the synthetic phase extension we need to use another convention, where the PE spins are defined with spin conversion phase 0. This function transforms between the different conventions.

Parameters

Name Type Description Default
samples Parameters. required
f_ref Reference frequency for definition of spins. required
sc_phase_old Spin conversion phase used for input parameters. If None, use the phase parameter. required
sc_phase_new Spin conversion phase used for output parameters. If None, use the phase parameter. required
num_processes Number of parallel processes. 1

Returns

Name Type Description
p_new parameters with changed spin conversion phase