# Interpretation of the output of a spectrometer: wavelength to energy conversion

## First question

This question may be uber-trivial, but I have a spectrometer that provides as output the number of ADC counts at given wavelengths (the wavelength vector is not equally spaced), i.e., something like

╔═════════════════╦════════╗
║ Wavelength [nm] ║ Counts ║
╠═════════════════╬════════╣
║ 220             ║ 50     ║
╠═════════════════╬════════╣
║ 221             ║ 100    ║
╠═════════════════╬════════╣
║ 221.5           ║ 125    ║
╠═════════════════╬════════╣
║ 222             ║ 20     ║
╠═════════════════╬════════╣
║ ...             ║ ...    ║
╚═════════════════╩════════╝


The spectrometer resolution is quite good compared to the light source, which has quite a broad spectrum.

In my opinion, the correct interpretation of the data is that they represent the counts in the bin centered around the wavelength given. The spectrometer does not provide the upper and lower limits of the bin, just a single value of the wavelength, as reported in the table.

Another interpretation is that they represent samples of the continuous spectrum at the given wavelength.

Which is the correct interpretation?

## Second question

I am interested in converting the data as a function of wavelength to energy.

I am aware that in order to convert the wavelengths to energy values I have to use the formula $$$$E = \frac{hc}{\lambda}$$$$

Now I am wondering if I have to convert the counts on the $$y$$-axis too. I mean, I am aware that for intensity spectra usually one uses the relation $$$$I(\lambda)\, \mathrm{d}\lambda = I(E)\, \mathrm{d}E$$$$ where, according to the previous formula $$\mathrm{d}E = (-hc /\lambda^2)\,\mathrm{d}\lambda$$, hence $$$$I(E) = \left|- \frac{hc}{\lambda^2}\right|I(\lambda)$$$$

However, in my case, I just have a number of counts per bin. So if I just change the $$x$$-axis form wavelength to energy, the number of counts should not change. Therefore, I think that I should not rescale the $$y$$-axis when passing from wavelength to energy.

Is this procedure correct, or should I rescale the $$y$$-axis with the last formula?

I think the answer to your first question is that it depends on the principle of operation of the spectrometer. For example a Fourier Transform Spectrometer is basically just a Michelson interferometer, so one could argue that by creating interference patterns you are selecting a sample from a continuous spectra. On the other hand, if you have a grating spectrometer or some other similar device, the answer is that the detector is binning, because such a spectrometer splits up the light source into a continuous range of wavelength dependent vectors, which then hits a detector array where each individual detector (presumably a photodiode) has some finite area.

For your second question, the answer again depends. If you are measuring intensity, such as with an interferometer, then yes, you should scale. Usually though, a spectrometer is measuring individual photon counts, and no scaling is required. Whether you have measured 10 photons at 200nm or 6eV, you have measured 10 photons, and no scaling is required.

Just to add a bit on the second point:

However, in my case, I just have a number of counts per bin. So if I just change the $$x$$-axis form wavelength to energy, the number of counts should not change. Therefore, I think that I should not rescale the $$y$$-axis when passing from wavelength to energy.

To understand this a bit better, let's suppose that you saw $$10$$ counts in the $$x \in [0, 1]$$ bin, and $$20$$ counts in the $$x \in [1, 2]$$ bin. Now you want to report the data in terms of $$y = 1/x$$. To do that, you could say that you saw $$10$$ counts in the $$y \in [1, \infty]$$ bin, and $$20$$ counts in the $$y \in [0.5, 1]$$ bin.

The point is, the bin counts haven't changed, but the widths of the bins have changed. That's exactly what you expect: the density (i.e. the bins per unit interval) depends on the variable you use. If you change variables but keep the same bins, that means the bin widths change. You could also force the bin widths to stay the same, but then you would have to rescale the counts.

Both procedures are correct, but which one is more useful depends on the situation. The former could be useful if you just wanted the total intensity in some narrow region, while the second would be useful if you wanted the shape of a continuous spectrum.