Convert wavelength (nm) into wave number, frequency (Hz) or energy per photon (J, or eV) and back.

## Usage

```
wl2wavenumber(w.length, unit.exponent = 0)
wavenumber2wl(wavenumber, unit.exponent = 0)
wl2frequency(w.length, unit.exponent = 0)
frequency2wl(frequency, unit.exponent = 0)
wl2energy(w.length, unit.exponent = 0, unit = "joule")
energy2wl(photon.energy, unit.exponent = 0, unit = "joule")
```

## Arguments

- w.length
numeric wavelength (nm)

- unit.exponent
integer Exponent of the scale multiplier implicit in result, e.g., use 3 for kJ.

- wavenumber
numeric Wave number in waves per metre, possibly with a scale factor according to

`unit.exponent`

.- frequency
numeric Frequency in Hz, possibly with the scale factor according to

`unit.exponent`

.- unit
character One of "joule" or "eV".

- photon.energy
numeric Energy of one photon in joule or eV, possibly with a scale factor according to

`unit.exponent`

.

## Details

These functions always expect as input and return wavelengths
expressed in nanometres (nm) as all other functions in the R for
photobiology suite of packages. Conversions depend on Plank's constant,
*h*, the speed of light in vacuum, *c*, and Avogadro's number,
\(N_A\). The values used for these constants have at least nine
significant digits.

## Examples

```
wl2wavenumber(600) # wavelength in nm -> wave number
#> [1] 1666667
wavenumber2wl(1666666.66) # wave number -> wavelength in nm
#> [1] 600
wl2frequency(600) # wavelength in nm -> wave frequency (Hz)
#> [1] 4.996541e+14
frequency2wl(499654096666667) # wave frequency (Hz) -> wavelength in nm
#> [1] 600
wl2energy(600) # wavelength in nm -> energy of one photon (J)
#> [1] 3.310743e-19
wl2energy(600, unit = "eV") # wavelength in nm -> energy of one photon (eV)
#> [1] 2.066403
wl2energy(600,
unit.exponent = -3,
unit = "eV") # wavelength in nm -> energy of one photon (meV)
#> [1] 2066.403
energy2wl(2066.40330,
unit.exponent = -3,
unit = "eV") # energy of one photon (meV) -> wavelength (nm)
#> [1] 600
```