Skip to main content
Designer and manufacturer of advanced imaging equipment
Thursday, 15 October 2026

Article

Spectrometer simulation with the ALTRON virtual camera and custom FWHM peaks

rahni

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.

Spectrometer simulation in ALTRON: Spectrometer-pattern peaks and the virtual camera settings window
Spectrometer simulation in ALTRON: Spectrometer-pattern peaks and the virtual camera settings window

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.

What exactly does FWHM mean?

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.

Defining peaks, one by one

When you select pattern 9, an extra row of settings appears below the patterns:

  1. In Preset You can load the characteristic lines of a known element, or stay on Custom and define the peaks yourself.
  2. 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.
  3. From the Peak Select the peak you want to edit.
  4. In Ch Set its colour channel: R, G or B.
  5. 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.
  6. In H% Set the peak height relative to the maximum peak level.
  7. 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.
  8. Finally, press Add camera.

The Def Resets all peaks to the default spectrum: 12 peaks at full height and 4 pixels wide.

Three tests we usually run

Set up the chain like this: virtual camera, SpectrumExtractor, SpectralAnalysis and a display. Then:

  • Resolving power: Place two peaks a few pixels apart and gradually increase the FWHM. See at which point SpectralAnalysis reports one peak instead of two in Peaks found. Adjust Peak min dist (px) here as well: of two peaks closer together than this distance, only the taller one is reported.
  • Weak peak: Lower the H% of one peak and see whether it is still detected with the current Peak threshold.
  • Wavelength calibration: In SpectralAnalysis, enter Lambda min and Lambda max so that peak positions are reported in nanometers. Since you set the position of each peak in pixels yourself, you can calculate the correct value in advance and compare it with the report. If your calibration is polynomial, enter the coefficients a0 to a3 in SpectrumExtractor.

A common mistake

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.

Where our equipment is used

Organizations, universities, industries and companies that have used our products

  • Hedayat Hooshmand Nozhan Sepehr