## 3 Results and Discussion  
Figure 2A shows the average second derivative NIR spectra of half, 1, 2, and 3 BSFL samples analyzed. The main differences in the second derivative NIR spectra can be observed around 1200 nm, associated with C-H\({}_{3}\) overtones (lipids); around 1420 nm, related to the first overtones of O-H (water and compounds containing aromatic rings); and around 1510 nm, related to the first overtones of N-H and O-H (water and protein content) [1; 3; 28; 29; 39]. Figure 2B,C show the average second derivative of the NIR spectra of the different BSFL samples from the two different waste streams analyzed. Similar bands in the NIR spectra were observed around 1200 nm and 1430 nm (first overtones of O-H) in the spectra of the larvae samples sourced from childcare and supermarket waste streams [1; 3; 28; 29; 39]. However, an additional band was observed around 1530 nm in the larvae samples sourced from the childcare waste stream [1; 3; 28; 29; 39]. These differences in the NIR spectra are associated with the variability in chemical composition between the larvae samples, due to differences in both lipid and protein content. This is expected as different waste stream sources with different compositions are used to feed the BSFL [1; 3; 28; 29; 31; 32]. Although no visual differences were observed in the NIR spectra due to the different number of larvae scanned, a linear response between the number of larvae and the absorbance values around 1199 nm was observed (R\({}^{2}\).098). This indicated that NIR wavelengths associated with lipids can be more susceptible to the number of larvae used during the analysis (e.g., spectra collection). Figure 3 shows the second derivative of the NIR spectra of the larvae samples analyzed with or without the use of the aluminum foil as the back cover. No differences in the NIR spectra were observed between scanning the samples  
Figure 1: Experimental protocol used to collect the near-infrared spectra of the black soldier fly larvae samples. W: with aluminum foil; W/O: without aluminum foil. with and without the use of the aluminum cover. Therefore, it was decided to compare and analyze only the samples covered with the aluminum foil. The second derivative NIR spectra of the BSFL samples was analyzed using PCA and LDA to visualize the effect of the sample presentation (number of larvae) and to classify the samples according to the waste stream (childcare vs. supermarket waste), respectively. Figure 4A-C shows the PCA score plot of all samples (Figure 4A) and the different waste sets separately (Figure 4B,C). The PCA score plot using all samples shows the effect of both waste streams and the number of larvae scanned. The first two principal components (PCs) explained 97% of the variability in the spectra. It was observed that the effect of sample presentation (number of larvae) in the NIR spectra can be explained by the PC1 (85%), where BSFL samples are separated along this PC by the number of larvae scanned. The effect of the waste stream used to feed the larvae is shown along PC2 (12%), where  
Figure 3: Average second derivative near-infrared spectra of black soldier fly larvae samples analyzed comparing the different aluminum foil (N: with aluminum foil; Y: with aluminum foil). Figure 2: Average second derivative near-infrared spectra of black soldier fly larvae samples analyzed by comparing the different number of samples scanned. ((**A**) all samples; (**B**) supermarket waste; (**C**) childcare waste). samples were separated according to the waste stream used to feed the larvae (childcare or supermarket waste). [PERSON] and collaborators (2022) [40] analyzed insect powders with a miniature NIR instrument and highlighted that the spectroscopic signal obtained depends on the physical and chemical characteristics of the powder samples analyzed. These authors stated that using a portable NIR instrument, the classification of insect powders might be possible by including the granulometric characteristics of the samples analyzed [40].