Article
Spectrometer simulation with the ALTRON virtual camera and custom FWHM peaks
Suppose the spectrometer optics are still being adjusted on the lab bench, but the software has to be ready right now. You need to make sure that peak finding works correctly, that two closely spaced peaks are separated, and that the wavelength calibration gives the correct value. Spectrometer simulation with the ALTRON virtual camera is made exactly for this: it generates a spectrum in which you have set the position of each peak and its FWHM width yourself, so you know the correct answer in advance.

What does the Spectrometer pattern generate?
In the Virtual Camera Settings window (the Manage Virtual Cameras button), select pattern 9 Spectrometer. Instead of an ordinary image, the virtual camera generates an emission line spectrum: sharp Gaussian peaks on a dark background, with a little noise, similar to what you get from a real spectrometer.
In a color format, the red, green and blue lines fall on different pixels. In a monochrome format, all lines appear together in a single curve. For a simple spectrometer, a Line scan virtual camera with the BW16 format is a good choice. Its 16-bit range has enough headroom to test weak and strong peaks side by side.
FWHM is the width of a peak at half its height. That is, come halfway down from the top of the peak and see how many pixels wide the peak is at that level. In spectroscopy, this number determines how close two lines can be and still be seen as separate. To measure the resolving power of your algorithm, you need to be able to control it.
When you select pattern 9, an extra row of settings appears below the patterns:
- In Preset You can load the characteristic lines of a known element, or stay on Custom and define the peaks yourself.
- In Peaks Set the number of peaks between 1 and 64. The default is 12 peaks, four for each color. Each new peak is added 100 pixels after the last peak.
- From the Peak Select the peak you want to edit.
- In Ch Set its colour channel: R, G or B.
- In Pos Enter the peak center in pixels from the left of the line. A peak that falls outside the sensor width is not visible.
- In H% Set the peak height relative to the maximum peak level.
- In FWHM Enter the peak width in pixels. The default is 4 pixels, which produces a sharp emission line. A larger value gives a broad band instead of a line.
- Finally, press Add camera.
The Def Resets all peaks to the default spectrum: 12 peaks at full height and 4 pixels wide.
Set up the chain like this: virtual camera, SpectrumExtractor, SpectralAnalysis and a display. Then:
The peaks are copied into the camera at the moment you click Add camera. This means a camera you created earlier keeps its previous settings. If you have changed the peaks, add a new camera.
To learn more about FWHM (full width at half maximum), Wikipedia article (English).
Read more about real cameras suitable for spectroscopy on the line scan cameras page. If you have a particular spectral chain in mind and don't know where to start, get help from contact page to send us the details.