Skip to main content
`Ctrl`+`K`
scipy.constants.

# lambda2nu

scipy.constants.lambda2nu(lambda_)

  Convert wavelength to optical frequency

  Parameters:
    lambda_array_like

      Wavelength(s) to be converted.

  Returns:
    nufloat or array of floats

      Equivalent optical frequency.

  Notes

  Computes `nu = c / lambda` where c = 299792458.0, i.e., the (vacuum) speed of light in meters/second.

  `lambda2nu` has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable `SCIPY_ARRAY_API=1` and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.

  Library | CPU | GPU
  --- | --- | ---
  NumPy | ✅ | n/a
  CuPy | n/a | ✅
  PyTorch | ✅ | ✅
  JAX | ✅ | ✅
  Dask | ✅ | n/a

  See Support for the array API standard for more information.

  Examples

      >>> from scipy.constants import lambda2nu, speed_of_light
      >>> import numpy as np
      >>> lambda2nu(np.array((1, speed_of_light)))
      array([  2.99792458e+08,   1.00000000e+00])