Below is a detailed explanation regarding spectroscopy and how SCiO works. I believe it will clarify most of the issues:
SCiO includes a light source that illuminates the sample and an optical sensor called a spectrometer that collects the light reflected from the sample.
The spectrometer breaks down the light to its spectrum (the spectra), which includes all the information required to detect the result of this interaction between the illuminated light and the molecules in the sample. This means that SCiO analyses the overall spectra that is received and, comparing it to different algorithms and information provided, identifies or evaluates it.
For example, if you know the basic spectra of a watermelon, and then see that as the watermelon gets sweeter, meaning it has more sugar content, the spectra gradually changes in a specific manner, you will be able to build an algorithm in accordance.
In recognizing the existence of a specific material, such as marijuana, in a sample, you will need to see if the reflectance of the material changes in a specific manner when the marijuana is present. Thus, you will need two samples of the material – with and without marijuana.
The basic idea is that we look at the overall reflectance and the why it changes – we do not separate and analyse it per specific molecules, rather we look at the whole composition.
This is why if your chemical composition varies between samples significantly and not only because of the factor you wish to analyse, you will need more samples, as with saliva.
We suggest you check out https://www.consumerphysics.com/myscio/technology and https://www.consumerphysics.com/myscio/images/dynamic/pdf/Spectroscopy.pdf for further information on spectroscopy.
Specifically, as for tomatoes, 40 is the amount of samples that we mention as a rule of thumb as a properly sized collection for a feasibility test. However, a comprehensive application should be based on hundreds of samples and thousands of scans.
Since SCiO applies machine learning algorithms, it should be noted that building the database for such an application requires not only access to samples but also their chemical characteristics.
This can be done either by us or by the SCiO developer community using our SCiO Development Toolkit (DevKit), which allows users to create models and apps. More info about the DevKit can be found here and It can be purchased here.
Let me know if you have further questions.
The Consumer Physics Team