Skip to content

Instantly share code, notes, and snippets.

@tkanmae
Last active August 29, 2015 14:06
Show Gist options
  • Save tkanmae/da7a452f19be89bdeb76 to your computer and use it in GitHub Desktop.
Save tkanmae/da7a452f19be89bdeb76 to your computer and use it in GitHub Desktop.
def difference_in_wavenumbers(delta_cm, at_nm):
"""
Parameters
----------
delta_cm : float
Difference in wavenumbers (cm-1)
at_nm : float
Wavelength (nm) at which `delta_cm` is evaluated.
Returns
-------
delta_nm : float
Difference in wavelength (nm).
"""
c = 1.0e-02
x = at_nm * 1.0e-09
y = x / ((delta_cm / c) * x + 1)
return abs(x - y) * 1.0e+09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment