0

My end goal is to create a machine learning model that can classify spectroscopic data from the SparkFun spectral sensor (https://www.sparkfun.com/products/14351). Unfortunately, it's infeasible for me to scan thousands of samples of dirt with the SparkFun sensor in order to create a dataset for training, so what I plan to do is aggregate the spectroscopic signature of DDT with signatures of normal soil samples in order to mimic the signature of a DDT-contaminated soil sample.

The problem is that this resultant data is of MUCH higher resolution than the sensor data, as the sensor data only gives me the intensities as 6 spectral bands as indicated in the manual (https://cdn.sparkfun.com/assets/1/b/7/3/b/AS7263.pdf). I'm not completely sure of the definition of spectral band, but SparkFun describes the bands as "Gaussians centered at wavelength \$\text{X}\$ nm with FWHM of 20 nm" where \$\text{X} \in \{610, 680, 730, 760, 810, 860\}\$

My question is how can I resample my high-resolution spectral data into the format of the SparkFun sensor (i.e, intensities of the 6 spectral bands defined by the sensor).

Additionally, I was also informed that I may need to "normalize" the data that I convert, as the magnitudes of the intensities given by the spectral sensor may not match up with the magnitudes of my converted dataset.

Thank you all!

soravoid
  • 1
  • 1
  • What do you mean by normalize? Looking at the source code the sensor directly gives you the energy at each spectral band. I think you can follow that example directly. – user1850479 Aug 07 '23 at 23:16
  • soravoid, I'm uncertain about what you want to do. One reading, mine, suggests that you are ***not*** even using that sensor but only want to figure out how to take data you have from some entirely different place and format and then somehow get it into the format produced by free software for this sensor -- for reasons that you haven't stated or discussed. Another reading, the one above my comment, seems to imagine you actually have the sensor and want to use it. Entirely different perspectives. Based on 2 data points (mine and above), your question is shown to be unclear. Please clarify. – periblepsis Aug 08 '23 at 00:19
  • @periblepsis I apologize for the confusion. I believe your reading was correct and I have updated the post accordingly with more details – soravoid Aug 25 '23 at 01:16
  • @user1850479 I apologize for being unclear, I've updated the post with more details – soravoid Aug 25 '23 at 01:16
  • Take a Gaussian with a FWHM of 20 nm centered at each of those wavelengths, multiply by your spectral data and then sum all resulting pixels together. In matlab this would be about 2-3 lines of code, so not much to it, although it'll probably be only approximately correct given the the sensor passband won't really be a perfect Gaussian. – user1850479 Aug 25 '23 at 01:29

0 Answers0