This is the case of a sample scanned in the same cup at different temperatures. Normally when we scan a sample is at a temperature similar to the laboratory, but sometimes we received the sample from the process and can be warmer and for different reasons we analyze the sample warmer than normally. There are other cases, especially in the winter that we take the sample from the truck with samples and the sample is very cold and we analyzed by NIR anyway.
In both cases probably we get a warning from the Mahalanobis distance, and a strange result and that is because the model does not incorporate the variance due to the temperature of the sample. In this case wait that the sample reaches the lab temperature and analyze it by NIR.
Of course maybe you can make the model robust to this effect.
In the next figure we can see the spectra of a sample in second derivative scanned 46 time at 46 different temperatures (from very warm to very cold) and we can see that all the spectra seem the same except in certain zones:
Now we calculate the average spectrum and we subtract every spectrum from the average spectrum, in order to do this I have export the spectra to Excel, and these curious spectra appear:
As we can see some kind of first derivatives appear at the wavelength zones of O-H, due probably to hydrogen bonds which shift the peaks of the water band.
Using repeatability files we can minimize this effect and obtain similar results analyzing the same sample at different temperatures.