6.4.3. Units conversion¶
Created the 27/10/2022
@author: Sebastien Weber
- pymodaq.utils.units.Ecmrel2Enm(Ecmrel, ref_wavelength=515)[source]¶
Converts energy from cm-1 relative to a ref wavelength to an energy in wavelength (nm)
- Parameters
- Returns
photon energy in nm
- Return type
Examples
>>> Ecmrel2Enm(500, 515) 528.6117526302285
- pymodaq.utils.units.Enm2cmrel(E_nm, ref_wavelength=515)[source]¶
Converts energy in nm to cm-1 relative to a ref wavelength
- Parameters
- Returns
photon energy in cm-1 relative to the ref wavelength
- Return type
Examples
>>> Enm2cmrel(530, 515) 549.551199853453
- pymodaq.utils.units.cm2nm(E_cm)[source]¶
Converts photon energy from absolute cm-1 to wavelength
Examples
>>> cm2nm(1e5) 100
- pymodaq.utils.units.eV2cm(E_eV)[source]¶
Converts photon energy from electronvolt to absolute cm-1
Examples
>>> eV2cm(0.07) 564.5880342655984
- pymodaq.utils.units.eV2nm(E_eV)[source]¶
Converts photon energy from electronvolt to wavelength in nm
Examples
>>> eV2nm(1.55) 799.898112990037
- pymodaq.utils.units.l2w(x, speedlight=300)[source]¶
Converts photon energy in rad/fs to nm (and vice-versa)
- Parameters
- Return type
Examples
>>> l2w(800) 2.356194490192345 >>> l2w(800,3e8) 2356194.490192345