27 may 2015

NIR used to study Mixtures (Part 1)

When developing a mixture of ingredients we use a to live some time to be sure that the mixture is fine and if we divide the mixed batch into several subsamples, the spectra of all the subsamples are similar each other in a certain level. If we see differences, we consider that the mixture is not completed and we can continue mixing. There is a point at a certain time where the mixture cannot be improve and after that point it can became worse to certain levels. We must be sure that we finish the mixture as closer to that point as possible.
If we get a library of spectra with those characteristics we can keep it and compare new batches in order to check if the spectrum at that time match with the spectra from the library.
In a mixture is also important that the quantities of every ingredient is correct, maybe we miss to add an ingredient, we add it in the wrong proportions,  or by mistake an ingredient which does not form part of the formula. Why not to detect even a cross contaminant, or other issues.
If we develop a model based on good spectra, and prepare a realistic cutoff we can check all the batches and detect if the PASS or FAIL the Identification or Qualification Test.
There can be cases where we can know what the problem was looking to the spectra. One simple example is to add to a mixture an ingredient which should not be there... let´s suppose "Dextrose", and I acquire the spectrum of this mixture, after I subtract this spectrum from the average spectrum of all the good spectra in the library (let´s say the ideal spectrum)…..you will see how the difference spectrum is the Dextrose itself, or very similar with a high correlation to the samples in the Dextrose product.
You can see also this with more complex techniques as Principal Component Analysisn (PCAs), where we have a reconstructed spectrum and a residual spectrum as well. Can we see any features in the residual spectrum which tell us what is the ingredient or ingredients not explained by the model? Maybe is the spectra of an adulterant, wrong ingredient added by mistake,...

20 may 2015

MD Looking to the subsamples statistics



Normally when scanning ungrounded samples like wheat, barley, corn in a NIR instrument, we use a large cup which moves across the sample presentation plate, in some cases continuously and in others stopping and scanning several times. Finally we get the average results, but there are some software’s which give you also the subsample results, giving information of the standard deviation between subsamples which is a good indicator for homogeneity or other issues. It can give you also the Mahalanobis distance for each subsample.

Suppose the case of a large cup where we acquire 32 scans. The cup stop in 8 different positions to scan the sample, so we have 8 subsamples with 4 scans each. Lower numbers of scans mean a noisier spectrum, so the Mahalanobis distance will be normally higher in all the subsamples (independently) than the Mahalanobis distance of the 32 scans average spectrum.

We have build our score matrix with 32 subscans average spectra, so if we compre spectra of 4 subscans average spectra it is normal we get out of range MD values.

19 may 2015

Importing spectra from "R" into Win ISI

I wanted to import the Gasoline spectra from the PLS package into Win ISI, so the first thing I have done was to export the Gasoline spectra to a TXT file:

write.table(gasoline$NIR,"c:/gasoline3.txt",sep="\t")

and after that I use the tool Convert from Win ISI to convert the TXT file into a NIR file. It was not so easy, and I have to organize a little bit the TXT file.


The idea is to compare (in next posts) Win ISI tools with the R Chemometric packages.

9 may 2015

Educreations: Compartiendo Conocimiento

Muy interesantes la cantidad de herramientas de que disponemos para aprender y transmitir nuestros conocimientos de una manera lo mas didáctica posible. Una de ellas es Educreations, pero hay otras que quiero ir probando también. He hecho un pequeño video que podéis ver en vuestro iPad.
Lección 1: Quimiometria
Lección 2: Quimiometria

Es entretenido hacer estos videos en "Educreations", y compartirlos. La opción básica tiene ciertas limitaciones, pero podemos hacer un pago temporal si estamos haciendo un proyecto y queremos aumentar la capacidad de almacenamiento, exportar los vídeos a otros formatos, y disponer de más herramientas.