hqs_nmr.conversion
Collection of functions and constants for conversion between units.
Functions
|
Convert variable from Hz to ppm. |
|
Convert variable from Hz to rad / s. |
|
Convert field in Tesla to a reference frequency in MHz with respect to specified isotope. |
|
Convert reference frequency in MHz with respect to specified isotope to field in Tesla. |
|
Convert variable from ppm to Hz. |
|
Convert variable from ppm to rad / s. |
|
Convert variable from rad / s to Hz. |
|
Convert variable from rad / s to ppm. |
- hqs_nmr.conversion.field_T_to_frequency_MHz(field_T: float, reference_isotope: Isotope = (1, 'H'), gyromagnetic_ratios: dict[Isotope, float] = {(1, 'H'): 267522128.0, (13, 'C'): 67282840.0, (15, 'N'): -27126180.4, (19, 'F'): 251814800.0, (31, 'P'): 108394000.0}) float [source]
Convert field in Tesla to a reference frequency in MHz with respect to specified isotope.
- Parameters:
field_T – Magnetic field in Tesla.
reference_isotope – Reference isotope for the conversion.
gyromagnetic_ratios – Dictionary of gyromagnetic ratios in rad / (T s).
- Returns:
Reference frequency.
- hqs_nmr.conversion.frequency_MHz_to_field_T(frequency_MHz: float, reference_isotope: Isotope = (1, 'H'), gyromagnetic_ratios: dict[Isotope, float] = {(1, 'H'): 267522128.0, (13, 'C'): 67282840.0, (15, 'N'): -27126180.4, (19, 'F'): 251814800.0, (31, 'P'): 108394000.0}) float [source]
Convert reference frequency in MHz with respect to specified isotope to field in Tesla.
- Parameters:
frequency_MHz – Reference energy in MHz.
reference_isotope – Reference isotope for the conversion.
gyromagnetic_ratios – Dictionary of gyromagnetic ratios in rad / (T s).
- Returns:
Reference frequency.
- hqs_nmr.conversion.rad_per_s_to_ppm(variable: Any, calculation_parameters: NMRCalculationParameters) Any [source]
Convert variable from rad / s to ppm.
- Parameters:
variable – Variable to be converted.
calculation_parameters – Calculation parameters used for the calculation. Contains the reference isotope and gyromagnetic ratios as well as the magnetic field.
- Returns:
Converted variable.
- hqs_nmr.conversion.ppm_to_rad_per_s(variable: Any, calculation_parameters: NMRCalculationParameters) Any [source]
Convert variable from ppm to rad / s.
- Parameters:
variable – Variable to be converted.
calculation_parameters – Calculation parameters used for the calculation. Contains the reference isotope and gyromagnetic ratios as well as the magnetic field.
- Returns:
Converted variable.
- hqs_nmr.conversion.Hz_to_ppm(variable: Any, calculation_parameters: NMRCalculationParameters) Any [source]
Convert variable from Hz to ppm.
- Parameters:
variable – Variable to be converted.
calculation_parameters – Calculation parameters used for the calculation. Contains the reference isotope and gyromagnetic ratios as well as the magnetic field.
- Returns:
Converted variable.
- hqs_nmr.conversion.ppm_to_Hz(variable: Any, calculation_parameters: NMRCalculationParameters) Any [source]
Convert variable from ppm to Hz.
- Parameters:
variable – Variable to be converted.
calculation_parameters – Calculation parameters used for the calculation. Contains the reference isotope and gyromagnetic ratios as well as the magnetic field.
- Returns:
Converted variable.