20 dic. 2017

Previous steps for a LOCAL calibration (part II)

Continuing with the previous post:
Previous steps for a LOCAL calibration
We can check the Mahalanobis distances (GH) from the samples from one product respect to the samples of other product, and to check the average MD, the maximum and minimum and how many samples are over a certain cutoff. The idea is to create a multiproduct library but not with products that are very different, so they have to maintain certain certain similarities in order to take the maximum benefits from the LOCALs calibrations
In the case of the green samples (pork meat meal type 2), the GH go from 1.109 to 6.375 versus the blue samples (pork meat meal type 1) with 17 samples over 3.00 (from 105) with an average of 2.43 respect to the PC space of the blue samples (pork meat meal type 1).

In the case of the green samples (pork meat meal type 3), the GH goes from 1.561 to 8.650 with 24 samples over 3.00 (from 40) with an average of 3.71 respect to the PC space of the blue samples(pork meat meal type 1).

In the case of the red samples ((pork meat meal type 4)), the GH go from 0.912 to 14.462 with 211 samples over 3.00 (from 402) with an average of 3.91 respect to the PC space of the blue samples  (pork meat meal type 1).
The GH high values are due specially to the second PC because are samples with higher protein than the samples in the blue group.
I seems that all these meat meal products can be merged in a unique library to develop a LOCAL calibration and we will see their configuration, extension, maintenance and validation in more coming posts

8 dic. 2017

Previous steps for a LOCAL calibration.

With four different sets of Meat meal (4 species of pork), I develop a lib file for each one. I see one of them on the 3D graph and add the others as secondary files in order to see how they match one with the others. Looking to the correlation of the scores respect their own libraries it is clear that for all of them the moisture is the main source of variation and is explained in all in the first principal component. The second principal component is the highest correlated to the second principal component in the four libraries.
Three of the families set overlap almost in the protein range, but one of them had a broad range in the low protein, so the idea is to see this in the scores maps.
In this plot, we see the scores of the four sets in the PC space of one of the libraries, overlapped.
Dark blue:   Range of protein from 44,26 to 77,3
Green:        Range of protein from 69,50  to 79,51
Light blue:   Range of protein from 69,50  to 82,90
Red:            Range of protein from 66,51  to 87

If we see the map of scores, which contain the second principal component, for all the groups and the plot for the dark blue group divided in 3rds we can get some conclusions.
 This are previous studies in order to build a Local calibration, so more details will came in next posts.


26 nov. 2017

Binning function in Prospectr package.

In the NIR spectrum there is a high correlation between most of the wavelengths, so we can reduce the spectra to allow more space between the wavelengths to manage better the spectra matrix.
The comercial softwares has the functions to do it, for example in Win ISI we can configure the wavelengths of a NIR 5000 which has 700 wavelengths if we configure the wavelengths selection to 1100-1498,2 , to 350 if we select 1100-2498,4. In this process we don´t lose relevant information for the development of a calibration, so it is applied quite often.
In the Prospectr there is the Binning, were we select the interval of wavelength selection in two ways:
X.bin <- binning(X, bin.size = 10)
In this case we keep one data point for every ten data points.

X.bin2 <- binning(X, bins = 50)
In this case we reduce the spectra matrix to 50 equal spaced data points.

13 nov. 2017

Bandwidth in the NIR Spectral Region

A question from Gabriela (thanks for your nice words about the blog) about the importance of the  resolution and bandwidth in the NIR instruments, takes me to see the paper from Karl Norris: "Limitations of Instrument Resolution and Noise on Quantitative analysis of Constituents with very Narrow Bandwidth in the NIR Spectral Region".
In this paper Karl Norris conclude that instruments with 10nm bandpass and a good signal to noise level ratio can measure constituents having a bandpass as narrow as 2 nm. It is not necessary to increase the resolution to detect them in case we increase the noise because the quantitative analysis become less accurate.
The experiment has been done with talc (2 nm bandwidth) in Avicel.

2 nov. 2017

Waiting for the instrument to be warming up to calibrate (DS2500)

Before to proceed to the instrument calibration in a DS2500 it is important to check that the instrument is stabilized fine. It is not enough to see that the instrument has pass the diagnostics, yo have to run several times the diagnostics and see that the "deltas" (difference between the nominal and founded values) for the wavelengths checked is stable and it finish drifting due to the warm up of the instrument.
In case that the deltas are close to cero for all wavelengths it is not necessary the calibration with the ERC, but if there is an slope in the values or a systematic difference it is better to calibrate to came with the values close to cero for all the wavelengths.
We don´t want to see drifts in the deltas as the instrument is warming up, and the ideal is to see random differences in the deltas for the several repetitions of the wavelength checks:

At this point we can continue with the calibration of the instrument (video).

23 oct. 2017

Enable Auto Archiving - ISIscan™

Testing the PC Standardization (Part 1)

PCA standardization is part of the types of standardization algorithms used in Win ISI. We start with a REP file with a certain scan spectra from two different instruments (same samples scanned on both instruments and giving the same name to them). When we select PCA standardization we go to the option "Create a Score file from a spectra file", and we see that the option to create a PCS file is activated, so when we do it, apart from to get a PCS file we get also a PCA file.

This PCS file is used after to reduce our CAL file ( the one  we use to develop the calibration). When we use "Reduce", we see how we can use a PCS file as optional:
We will use the reduced output file to develop the calibration.

9 oct. 2017

How many samples are needed for a calibration?

One of the questions normally asked is: how many samples are needed for a calibration?, for how long I have to add samples to a calibration.

Of course what is necessary is calibration data from different years. At the beginning we can have a nice SEC but not so nice SECV or SEP, but as soon as we have more data from next years we will see how the SEC is increasing and the SECV and SEP are decreasing and are becoming closer to the SEC and the continue to become similar, but not bellow.
The idea is to continue adding samples and variability while SECV is significantly different than the SEC and while the SEP is significantly different than the SECV.

23 sept. 2017

Draft of Win ISI diagram

Working on the main diagram of Win ISI for a presentation. This is a draft and I have to add more tools from new versions.