Free software

About OpticalSetup

Copyright © 2026 Luca Genchi and contributors.

OpticalSetup is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

It is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

The numbers OpticalSetup reports come from models with stated limits; read each component's page in the wiki before relying on one.

If you use OpticalSetup in your research, teaching or publications, please cite the software:

Bertoncini, A., & Genchi, L. (2026). OpticalSetup - the optical workbench software [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23191537

Calculators / Nonlinear frequency conversion

Nonlinear frequency conversion

Find the generated wavelength of second- and third-harmonic generation, sum- and difference-frequency generation, the signal and idler of an optical parametric oscillator, or the CARS and CSRS lines of a pump and Stokes pair. Every wave is shown as a vacuum wavelength, frequency and photon energy, and on a spectrum. Give the inputs a bandwidth to read a Gaussian bandwidth estimate for each generated wave, under the assumptions stated for its process.

1Input and generated spectra
Each wave as a Gaussian in frequency, scaled to its own peak, so the heights do not compare powers; its bandwidth in nm is the FWHM of this curve. Given waves are blue and aqua, generated ones orange and plum, with their central wavelengths written under the axis in the same colour. A wave with zero bandwidth is a vertical line at its wavelength.
Data table
Model
Photon-energy conservation for χ⁽²⁾ and χ⁽³⁾ processes; Gaussian bandwidth estimates under stated assumptions (whole spectrum phase-matched; a singly resonant OPO). No crystal, phase-matching or efficiency model.
Evidence
Equations checked against independent Python references, with published or exact algebraic anchors. These checks do not establish experimental accuracy.
Example
1064 nm → 532 nm (SHG, as in NIST’s example [2]) and 354.67 nm (THG); a 515 nm-pumped OPO with an 800 nm signal has a 1445.6 nm idler. A 1 nm-wide 1064 nm fundamental gives a second harmonic at most 0.354 nm wide.

Energy conservation and spectral widths

In a parametric process the medium returns to its initial state, so the photon energies balance and the generated frequency follows from the input frequencies [1]. All wavelengths here are vacuum wavelengths, and each wave is also given as a frequency and a photon energy:

ν=cλ,E=hν=hcλ\nu=\frac{c}{\lambda},\qquad E=h\nu=\frac{hc}{\lambda}
c = 299 792 458 m/s is the speed of light in vacuum and h = 6.626 070 15 × 10⁻³⁴ J s the Planck constant, both exact in the SI; E is shown in eV.

Each input spectrum is a Gaussian in frequency. The bandwidth Δλ you enter (0 for a single line, at most half the wavelength) is the FWHM of that curve against wavelength. Its half-maximum points lie at c/(ν ∓ Δν/2), so the frequency FWHM Δν and Δλ are related by

Δλ=cν−Δν/2−cν+Δν/2=c Δνν2−Δν2/4  ≈  λ2c Δν\Delta\lambda=\frac{c}{\nu-\Delta\nu/2}-\frac{c}{\nu+\Delta\nu/2}=\frac{c\,\Delta\nu}{\nu^2-\Delta\nu^2/4}\;\approx\;\frac{\lambda^2}{c}\,\Delta\nu

The approximation holds for a narrow spectrum. Generated widths are read back to nm the same way, so every width in nm is the FWHM of the curve drawn. When the crystal phase-matches the whole spectrum, the generated field is the product of the input fields and its spectrum the convolution of theirs; for Gaussians the frequency widths then add in quadrature, each field counted as often as it appears. For the harmonics, SFG, DFG and coherent Raman that is the widest spectrum the inputs allow; for the OPO it is an estimate in a stated regime. The real width also depends on phase matching: an acceptance bandwidth smaller than this width narrows the generated spectrum, and the group-velocity mismatch between the waves can reshape it, as in the spectral compression of SHG below. Each process below gives the centre wavelength first, then the bandwidth.

Harmonic generation (SHG and THG)

Second-harmonic generation (SHG) in a χ⁽²⁾ crystal combines two photons of the fundamental into one at twice its frequency. Third-harmonic generation (THG) combines three, either directly through χ⁽³⁾ or by cascading SHG with sum-frequency generation of the harmonic and the fundamental [1]. The page solves either way, from the fundamental or from the harmonic:

νnω=n ν,λnω=λ/n(n=2 for SHG, 3 for THG)\nu_{n\omega}=n\,\nu,\qquad \lambda_{n\omega}=\lambda/n\qquad (n=2\ \text{for SHG},\ 3\ \text{for THG})

The harmonic field is the nth power of the fundamental field, Eⁿ, so its frequency FWHM is √n times that of the fundamental:

Δνnω=n Δν\Delta\nu_{n\omega}=\sqrt{n}\,\Delta\nu

The factor √n holds for transform-limited pulses, for pulses with a linear chirp (raising the field to the nth power multiplies both the chirp and the inverse square duration by n) and for broadband CW light with Gaussian statistics. A second harmonic is therefore √2 wider in frequency than its fundamental and, for a narrow spectrum, about 2√2 narrower in wavelength: 1 nm at 1064 nm gives 0.354 nm at 532 nm. For a broad spectrum the exact relation above gives less: 500 nm at 1064 nm gives 172.3 nm, not 176.8 nm. Solving back from a harmonic gives the narrowest fundamental that could produce it.

This assumes that the crystal phase-matches the whole fundamental spectrum. In practice the harmonic bandwidth depends on phase matching, and SHG can even narrow the spectrum: with a large group-velocity mismatch between the interacting pulses, a large fraction of the energy of a broadband femtosecond fundamental goes into a narrowband picosecond second harmonic. Marangoni et al. used this spectral compression in a periodically poled stoichiometric lithium tantalate crystal to generate 200 nJ pulses narrower than 8.5 cm⁻¹, tunable from 720 to 890 nm [3]. The page does not model the crystal, so its value is the upper limit for full phase matching.

Sum-frequency generation (SFG)

SFG combines one photon from each of two inputs into a photon at the sum of their frequencies; SHG is its degenerate case [1].

ν3=ν1+ν2,1λ3=1λ1+1λ2\nu_3=\nu_1+\nu_2,\qquad \frac{1}{\lambda_3}=\frac{1}{\lambda_1}+\frac{1}{\lambda_2}

The generated field is E₁E₂, so the frequency FWHMs add in quadrature:

ΔνSFG=Δν12+Δν22\Delta\nu_{\mathrm{SFG}}=\sqrt{\Delta\nu_1^2+\Delta\nu_2^2}

The sum holds for transform-limited pulses and for independent CW lines. Chirped inputs can mix into a narrower output: opposite chirps cancel in the sum frequency.

Difference-frequency generation (DFG)

DFG generates the difference of two input frequencies. It is the process behind parametric amplification: the lower-frequency input grows as the difference frequency is generated [1]. Close inputs give long wavelengths, down to the terahertz range.

ν3=ν1−ν2,1λ3=1λ1−1λ2(λ1<λ2)\nu_3=\nu_1-\nu_2,\qquad \frac{1}{\lambda_3}=\frac{1}{\lambda_1}-\frac{1}{\lambda_2}\quad(\lambda_1<\lambda_2)

The generated field is E₁E₂*, so again the frequency FWHMs add in quadrature:

ΔνDFG=Δν12+Δν22\Delta\nu_{\mathrm{DFG}}=\sqrt{\Delta\nu_1^2+\Delta\nu_2^2}

As for SFG, this holds for transform-limited pulses and for independent CW lines. Equal chirps cancel in the difference frequency and narrow it, the spectral focusing of the Coherent Raman page.

Optical parametric oscillation (OPO)

In an OPO a pump photon splits into a signal and an idler photon, amplified by difference-frequency generation in a crystal inside a cavity that resonates at one or both outputs [1]. The signal is, by convention, the higher-frequency output; signal and idler meet at the degeneracy wavelength 2λp. Enter the output the cavity resonates, signal or idler, and the page solves the other. One pump photon yields one signal and one idler photon. This is the content of the Manley–Rowe relations, first derived for nonlinear electrical circuits [8] and holding for any lossless parametric process: the photon fluxes of the waves change together, so the power each wave gains or loses is proportional to its frequency [1]. At most a fraction λp/λ of the converted pump power can therefore go into each output.

νp=νs+νi,1λp=1λs+1λi,λs≤2λp≤λi\nu_p=\nu_s+\nu_i,\qquad \frac{1}{\lambda_p}=\frac{1}{\lambda_s}+\frac{1}{\lambda_i},\qquad \lambda_s\le 2\lambda_p\le\lambda_i

The bandwidth is not fixed by energy conservation alone, so the page estimates it for a singly resonant OPO. The width of the resonant output is set by the cavity and the phase-matching gain bandwidth, so you give it. It is not limited by the pump’s: only the sum of the signal and idler frequencies is fixed, and broadband parametric designs reach signals of a few optical cycles [4]. The non-resonant output is taken as the difference frequency of the pump and the resonant wave, with field EpEres*, so its width follows the DFG rule:

Δνnon-res=Δνp2+Δνres2\Delta\nu_{\mathrm{non\text{-}res}}=\sqrt{\Delta\nu_p^2+\Delta\nu_{\mathrm{res}}^2}

With a single-line resonant wave the other output takes the pump’s width; with a narrow pump it mirrors a broad resonant wave. As for DFG, this holds for transform-limited pulses and for independent CW lines. It is an estimate, not a general property of oscillators: a doubly resonant cavity, high gain and correlations between the waves also shape the spectra. Entering the other output as the resonant one describes a different oscillator, so its width does not have to come back.

Coherent Raman scattering (CARS and CSRS)

CARS and CSRS are four-wave mixing in χ⁽³⁾: a pump and a Stokes beam drive a molecular vibration at their difference frequency, and pump or Stokes photons scatter off it on either side, giving the coherent anti-Stokes (CARS) and coherent Stokes (CSRS) signals [5][6]. CSRS exists only while the Raman frequency is below the Stokes frequency.

CARS: νas=2νp−νS,CSRS: νcs=2νS−νp  (while νp−νS<νS)\text{CARS: }\nu_{\mathrm{as}}=2\nu_p-\nu_S,\qquad \text{CSRS: }\nu_{\mathrm{cs}}=2\nu_S-\nu_p\;(\text{while}\ \nu_p-\nu_S<\nu_S)

For transform-limited pulses and an instantaneous response, the CARS field is Ep²ES* and the CSRS field ES²Ep*, so the beam used twice counts twice:

ΔνCARS=2Δνp2+ΔνS2,ΔνCSRS=2ΔνS2+Δνp2\Delta\nu_{\mathrm{CARS}}=\sqrt{2\Delta\nu_p^2+\Delta\nu_S^2},\qquad \Delta\nu_{\mathrm{CSRS}}=\sqrt{2\Delta\nu_S^2+\Delta\nu_p^2}

An instantaneous response describes the non-resonant background, which comes from the electronic response of the medium [5], or a Raman line broader than the excitation. A resonant vibration keeps its coherence for its dephasing time T2, of the order of picoseconds [5], so a narrow Raman line narrows CARS towards the pump width and CSRS towards the Stokes width. Broadband CARS and stimulated Raman techniques, in the frequency and time domains, are reviewed by Polli et al. [7]. The Coherent Raman scattering calculator also solves from a Raman shift, estimates the spectral resolution and shows the probed window on reference spectra.

Precision and limits

Known wavelengths are accepted from 100 to 20000 nm; generated waves may fall outside that interval (DFG of close wavelengths reaches the terahertz range). DFG needs two different inputs; an OPO output must be longer than the pump. An input bandwidth may be at most half its wavelength, which keeps its spectrum clear of zero frequency; when a generated spectrum would not be (DFG of close, broad inputs, or a fundamental solved from a very broad harmonic), the page gives no bandwidths and draws lines. An independent reference computes each process in SI frequencies and checks the page to 10⁻⁹ relative, with exact rational anchors. It also builds the generated field from Gaussian input pulses, transforms it by direct quadrature and measures the FWHM of its spectrum, with and without chirp, finds every width in nm by bisection on the curve against wavelength, and agrees with the bandwidths to 10⁻⁹ relative.

Energy conservation says which wavelength a process would generate, not whether it does: phase matching, crystal transparency and damage, acceptance bandwidths, pulse overlap, power and conversion efficiency are not modelled. Spectra are Gaussian; other shapes and pulse-to-pulse fluctuations are not. Wavelengths inside a medium are shorter by its refractive index; this page reports vacuum wavelengths throughout.

References

  1. R. W. Boyd, Nonlinear Optics, 4th ed., Academic Press (2020), ISBN 978-0-12-811002-7: chapters 1–2.
  2. NIST, Frequency Conversion Interfaces for Photonic Quantum Systems, including the 1064 → 532 nm example.
  3. M. A. Marangoni, D. Brida, M. Quintavalle, G. Cirmi, F. M. Pigozzo, C. Manzoni, F. Baronio, A. D. Capobianco and G. Cerullo, “Narrow-bandwidth picosecond pulses by spectral compression of femtosecond pulses in second-order nonlinear crystals,” Opt. Express 15, 8884–8891 (2007).
  4. G. Cerullo and S. De Silvestri, “Ultrafast optical parametric amplifiers,” Rev. Sci. Instrum. 74, 1–18 (2003).
  5. H. Rigneault and P. Berto, “Tutorial: Coherent Raman light matter interaction processes,” APL Photonics 3, 091101 (2018).
  6. S. Heuke and H. Rigneault, “Coherent Stokes Raman scattering microscopy (CSRS),” Nat. Commun. 14, 3337 (2023).
  7. D. Polli, V. Kumar, C. M. Valensise, M. Marangoni and G. Cerullo, “Broadband coherent Raman scattering microscopy,” Laser Photonics Rev. 12, 1800020 (2018).
  8. J. M. Manley and H. E. Rowe, “Some general properties of nonlinear elements — Part I. General energy relations,” Proc. IRE 44, 904–913 (1956).