This is another pretreatment used quite often in Near Infrared to remove the scatter. It is applied to every spectrum individually.
The average and standard deviation of all the data points for that spectra is calculated. Every data point of the spectra is substracted from the mean and divided by the standard deviation.
“R” has a function to center and scale every vector which we can use to get the SNV spectrum. Let´s apply this function to our known Yarn NIR data.