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 \begin{equation} E = \frac{hc}{\lambda} \end{equation}
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 \begin{equation} I(\lambda)\, \mathrm{d}\lambda = I(E)\, \mathrm{d}E \end{equation} where, according to the previous formula $\mathrm{d}E = (-hc /\lambda^2)\,\mathrm{d}\lambda$, hence \begin{equation} I(E) = \left|- \frac{hc}{\lambda^2}\right|I(\lambda) \end{equation}
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?