125k views
0 votes
Currently, I am looking into using a spectral sensor from SparkFun in order to obtain spectroscopic data to feed into a trained neural network, however this sensor gives intensities based on inputs from channels centered around different wavelengths.

In order to generate the data to train our algorithm, we plan to take spectroscopic data of random samples of dirt and add traces of our target chemical's spectrum (i.e., add together and renormalize). What is a good way to get our continuous spectrum data into the format given by the sensor?

I was considering the using the Fourier transform on the continuous data and using the values located at the frequencies at which the channels are centered to "convert" the data to the proper format, but I'm not sure if this is physically correct. I know that f=cλ
, so maybe there needs to be a constant factor thrown in somewhere.

I'm not very well versed in chemistry, so I would appreciate some advice about this situation or more resources which could help enlighten me on this topic. Thank you in advance!

1 Answer

1 vote

Final answer:

To convert the continuous spectrum into the format given by the spectral sensor, you need to discretize the spectrum into channels centered around the wavelengths corresponding to the sensor's channels. The intensities for each channel can be calculated by integrating the continuous spectrum over the range of wavelengths covered by that channel. These discretized intensities can then be used as inputs for your neural network.

Step-by-step explanation:

To convert the continuous spectrum data into the format given by the spectral sensor, you can't directly use the Fourier transform on the continuous data as it won't provide the intensities based on different wavelengths.

However, you can approximate the sensor's output by discretizing the continuous spectrum into channels centered around the wavelengths corresponding to the sensor's channels. The intensities for each channel can be calculated by integrating the continuous spectrum over the range of wavelengths covered by that channel.

For example, if the sensor has channels centered at 500 nm, 550 nm, 600 nm, and so on, you would calculate the intensities by integrating the continuous spectrum from 475 nm to 525 nm for the first channel, from 525 nm to 575 nm for the second channel, and so on.

Once you have the discretized intensities for each channel, you can use them as inputs for your neural network.

User Tomathon
by
9.3k points