11.3.1.2. Units conversion

pymodaq.daq_utils.daq_utils.Enm2cmrel(E_nm, ref_wavelength=515)[source]

Converts energy in nm to cm-1 relative to a ref wavelength

Parameters:
  • E_nm (float) – photon energy in wavelength (nm)
  • ref_wavelength (float) – reference wavelength in nm from which calculate the photon relative energy
Returns:

photon energy in cm-1 relative to the ref wavelength

Return type:

float

Examples

>>> Enm2cmrel(530, 515)
549.551199853453
pymodaq.daq_utils.daq_utils.Ecmrel2Enm(Ecmrel, ref_wavelength=515)[source]

Converts energy from cm-1 relative to a ref wavelength to an energy in wavelength (nm)

Parameters:
  • Ecmrel (float) – photon energy in cm-1
  • ref_wavelength (float) – reference wavelength in nm from which calculate the photon relative energy
Returns:

photon energy in nm

Return type:

float

Examples

>>> Ecmrel2Enm(500, 515)
528.6117526302285
pymodaq.daq_utils.daq_utils.eV2nm(E_eV)[source]

Converts photon energy from electronvolt to wavelength in nm

Parameters:E_eV (float) – Photon energy in eV
Returns:photon energy in nm
Return type:float

Examples

>>> eV2nm(1.55)
799.898112990037
pymodaq.daq_utils.daq_utils.nm2eV(E_nm)[source]

Converts photon energy from wavelength in nm to electronvolt

Parameters:E_nm (float) – Photon energy in nm
Returns:photon energy in eV
Return type:float

Examples

>>> nm2eV(800)
1.549802593918197
pymodaq.daq_utils.daq_utils.eV2cm(E_eV)[source]

Converts photon energy from electronvolt to absolute cm-1

Parameters:E_eV (float) – Photon energy in eV
Returns:photon energy in cm-1
Return type:float

Examples

>>> eV2cm(0.07)
564.5880342655984
pymodaq.daq_utils.daq_utils.nm2cm(E_nm)[source]

Converts photon energy from wavelength to absolute cm-1

Parameters:E_nm (float) – Photon energy in nm
Returns:photon energy in cm-1
Return type:float

Examples

>>> nm2cm(0.04)
0.000025
pymodaq.daq_utils.daq_utils.cm2nm(E_cm)[source]

Converts photon energy from absolute cm-1 to wavelength

Parameters:E_cm (float) – photon energy in cm-1
Returns:Photon energy in nm
Return type:float

Examples

>>> cm2nm(1e5)
100
pymodaq.daq_utils.daq_utils.l2w(x, speedlight=300)[source]

Converts photon energy in rad/fs to nm (and vice-versa)

Parameters:
  • x (float) – photon energy in wavelength or rad/fs
  • speedlight (float, optional) – the speed of light, by default 300 nm/fs
Returns:

Return type:

float

Examples

>>> l2w(800)
2.356194490192345
>>> l2w(800,3e8)
2356194.490192345