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

Examples / Fundamentals / Czerny–Turner monochromator

Czerny–Turner monochromator

A slit, two concave mirrors and a grating: the lines of a mercury lamp are spread across the plane of the exit slit, and turning the grating brings them through it one at a time.

Open in the canvas →

A live trace of the setup above, shown as a picture. Open it in the canvas to take it apart, retune it, and save or export it as your own.

Background

The classical grating monochromator is the Czerny–Turner design[1]. Light is focused on an entrance slit and diverges behind it. A concave mirror, with the slit at its focus, makes the light parallel and sends it to a diffraction grating, which turns each wavelength by a slightly different angle. A second concave mirror turns those directions into positions: it forms an image of the entrance slit in each wavelength, side by side in the plane of the exit slit, so that only a narrow range of wavelengths gets through[1,2].

The grating stands on a rotation stage, and its angle sets the wavelength at the centre of the pass band[1]. With the mirrors and slits fixed, the directions to and from the grating are fixed too, at an angle 2K to each other, and the grating equation becomes mλ/d = 2 sin φ cos K for a grating of period d turned by φ from the position in which it would act as a plain mirror. The wavelength does not follow the angle linearly, which instruments correct in software[1].

The width of the band that passes depends on the widths of the slits and on the dispersion, the range of wavelengths per unit of slit width[2]. A narrower band improves the resolution and lowers the signal-to-noise ratio[2]. With a detector behind the exit slit and a motor on the grating, this is the scanning monochromator described on the spectrometer page; with a detector array in place of the exit slit, the same optics make a spectrograph.

What this setup demonstrates

A mercury lamp (a Point source set to a gas discharge lamp) is imaged by a small lens onto an entrance slit of 0.5 mm. Two concave mirrors of f = 200 mm, each turning the light by 16°, stand 198 mm from the slits and 190 mm from a reflection grating of 600 lines per millimetre, of which the first order is traced. The exit slit is 1 mm wide. Grey walls stand for the housing: they absorb what the grating sends elsewhere.

The lamp's light reaches the grating as one parallel beam and leaves it as one beam per line, each in its own direction and drawn in its own colour. As shipped the grating is turned to 189.81°, 9.81° from the mirror position, and the green line at 546.07 nm passes the exit slit. The detector behind it is a Spectrometer element, used here only to show what arrives: its screen shows that one line, and its inspector a relative ray weight of 0.24, the share of the lamp's light the app gives that line. The violet and blue lines and the yellow pair end on the plate of the slit.

Things to try: turn the grating (its rotation in the inspector) to bring another line through. With K = 16° the equation above gives:

LineGrating rotation
365.0 nm186.54°
404.7 nm187.26°
435.8 nm187.82°
546.1 nm189.81°
577.0 and 579.1 nm190.40°
1014.0 nm198.45°

Each line passes over a range of about 0.15° around its angle. The two yellow lines pass together: in the plane of the exit slit the spectrum is spread by about 8.4 nm per millimetre (d cos β / f, with β the angle at which the light leaves the grating), so lines 2.1 nm apart land 0.25 mm apart, inside the 1 mm slit. This instrument does not separate them; a longer focal length, a finer grating or a narrower slit would. Open the exit slit to 8 mm with the grating at 189.81° and the yellow pair joins the green line: the detector shows both and reads 0.44.

What you won't see

Only the focus in the plane of the drawing is shown. A spherical mirror used at an angle θ focuses the rays in the plane of the turn at (R/2) cos θ and the rays in the plane across it at (R/2)/cos θ: here 198.1 mm and 202.0 mm. The slits stand at the first, where the image of the entrance slit is sharp across its width; along the slit, out of the drawing, a real instrument's image is stretched by this astigmatism, and the slit's height does not exist here.

The lamp is a point at the centre of the entrance slit, so the width of that slit plays no part in the width of the line images, as it does in a real instrument. The lines have no width of their own and the grating no resolving limit: what separates two lines here is the geometry of the rays and the exit slit alone. The grating sends all of each line into the one order traced, whatever the wavelength; a real grating's efficiency varies across the spectrum and some light goes to other orders, which a real housing has to absorb. The strengths of the lamp's lines are nominal, so the detector's readings compare lines only roughly.

Related components

References

  1. RP Photonics Encyclopedia — Monochromators
  2. Wikipedia — Monochromator