vibrav.numerical.phases module¶
- vibrav.numerical.phases.correct_phase_angle(data_df)[source]¶
Here we analyze the phase angle of the input data and perform a “rotation” by the phase angle. We determine the phase angle by getting the highest absolute magnitude in each “transition” (nrow value) and determine the angle such that we minimize the imaginary value for that component in the “transition”.
Note
This has been hard-coded for Molcas/OpenMolcas with the files printed from RASSI with the PRPRint keyword.
- vibrav.numerical.phases.get_theta(real, imag, exc, nexc, ncomps, tol)[source]¶
Determine the theta angle to rotate the input data by. Here, we determine which component has the largest magnitude and use that to get what value of theta we need for the phase rotation.
- Parameters:
real (numpy.ndarray) – Array of the real values of the property of interest.
imag (numpy.ndarray) – Array of the imaginary values of the property of interest.
exc (int) – Integer of the excited state.
nexc (int) – Number of excited states.
ncomps (int) – Number of components for the property.
tol (float) – Tolerance for determining what a small values is.
- Returns:
theta (float) – Theta rotation angle value. imax (int): Integer of the component that we
calculated the rotation angle at.
rmax (float): Magnitude of the maximum component.
- vibrav.numerical.phases.perform_phase(dip_real, dip_imag, mag_real, mag_imag, quad_real, quad_imag, nexc, state)[source]¶
Do a phase rotation of the real and imaginary data for transitions from a particular ground state. This will determine which of the properties to use based on the magnitudes of them. This is to ensure that we are not doing this based on numercial artifacts in the data.
Note
This function is hard-coded for the electric dipole, magnetic dipole, and electric quadrupole. In our testing this was enough. If more are needed then this code will have to be changed slightly.
- Parameters:
dip_real (numpy.ndarray) – Real values of the electric dipole.
dip_imag (numpy.ndarray) – Imaginary values of the electric dipole.
mag_real (numpy.ndarray) – Real values of the magnetic dipole.
mag_imag (numpy.ndarray) – Imaginary values of the magnetic dipole.
quad_real (numpy.ndarray) – Real values of the electric quadrupole.
quad_imag (numpy.ndarray) – Imaginary values of the electric quadrupole.
nexc (int) – Number of excited states.
state (int) – Ground state value for storage.
- Returns:
dip_arr (numpy.ndarray) –
- Array containing the data of
electric dipoles after the phase angle rotation.
- mag_arr (numpy.ndarray): Array containing the data of
magnetic dipoles after the phase angle rotation.
- quad_arr (numpy.ndarray): Array containing the data of
electric quadrupoles after the phase angle rotation.