Wavelength API
Electromagnetic-wave maths as an API, computed locally and deterministically. The convert endpoint converts between wavelength and frequency (λ = c ÷ f) and also reports the period, the wavenumber, the photon energy and the part of the spectrum — optionally for light travelling in a medium of a given refractive index, where the wavelength scales by 1/n while the frequency stays the same. The energy endpoint gives the photon energy in joules, electron-volts and kilo-electron-volts from a wavelength or frequency (E = h·f = h·c ÷ λ). The band endpoint classifies a wavelength or frequency into the electromagnetic spectrum — radio, microwave, infrared, visible, ultraviolet, X-ray or gamma — and adds the ITU radio sub-band (ELF through EHF) and the approximate colour for visible light. Frequencies accept Hz/kHz/MHz/GHz/THz and wavelengths m/cm/mm/µm/nm/pm/ångström. Everything is computed locally and deterministically, so it is instant and private. Ideal for RF and antenna tools, optics and photonics, spectroscopy and lab software, physics and astronomy education, and amateur radio. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is electromagnetic-wave physics; for general unit conversion use a unit-conversion API.
api.oanor.com/wavelength-api