Skip to main content
Designer and manufacturer of advanced imaging equipment
Friday, 9 October 2026

Article

Spectrometer simulation with the ALTRON virtual camera and custom FWHM peaks

rahni

Suppose the spectrometer optics are still being aligned on the lab bench, but the software has to be ready now. You need to be sure peak finding works correctly. You need to see whether two close peaks are separated. And you need to know whether the wavelength calibration gives the right number. Spectrometer simulation in the ALTRON virtual camera is made exactly for this.

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?

When you choose pattern 9 Spectrometer in the Manage Virtual Cameras window, the virtual camera builds an emission line spectrum instead of a normal image. The spectrum shows sharp Gaussian peaks on a dark background with a little readout noise, just like what you get from a real spectrometer.

This pattern works with every pixel format. In a colour format, the red, green and blue lines land on different pixels. In a monochrome BW8 or BW16 format, all the lines appear together in one spectrum.

What exactly does FWHM mean?

FWHM is the width of a peak at half its height. In other words, 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 sets how close two lines can be and still appear separate. So if you want to measure your algorithm's resolving power, you need to be able to control it.

Defining peaks, one by one

When you choose pattern 9, an extra row of settings appears below the patterns. Here's how to use it:

  1. In Peaks Set the number of peaks between 1 and 64. The default is 12 peaks, four for each colour. If you raise the number, each new peak is added 100 pixels after the last one and takes the next colour.
  2. From the Peak list, choose the peak you want to edit (peak1, peak2 and so on).
  3. In Ch Set its colour channel: R, G or B.
  4. In Pos Enter the peak centre in pixels from the left of the line. A peak that falls outside the sensor width isn't shown.
  5. In H% Set the peak height relative to the peak ceiling. The ceiling is about 65000 at 16 bits and about 250 at 8 bits.
  6. In FWHM Give the peak width between 0.5 and 2000 pixels. The default is 4 pixels, which makes a sharp emission line. If you enter a larger number, you get a broad band instead of a line.
  7. Finally, press Add camera.

The Def button returns everything 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. This is a good place to tune Peak min dist (px).
  • Weak peak: Lower the H% of one peak and see whether it is still detected with the current Peak threshold.
  • Wavelength calibration: Because you set each peak's position in pixels yourself, you already know the right answer. Enter the coefficients a0 to a3 in SpectrumExtractor and compare the nanometre value reported for the peak with your own calculation.

Two common mistakes

First, the peaks are copied into the camera at the moment you press Add. That means a camera you created earlier keeps its old settings. If you've changed the peaks, add a new camera.

Second, if you're also testing RamanPreprocess for a Raman spectrum, place it after SpectrumExtractor. If it comes before, the spectrum plot stays empty.

One last tip: for a simple spectrometer, a Line scan virtual camera with the BW16 format is a good choice. In this mode, all the peaks appear in a single curve. The 16-bit range also has enough headroom to test weak and strong peaks side by side. Read more about real cameras suited to spectroscopy on the line scan cameras page.

To learn more about FWHM (full width at half maximum), Wikipedia article (English).

If you have a specific spectral chain in mind and don't know where to start, use 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