23 oct. 2013

Applying "Detrend" to the spectra with R

There is a nice math treatment I use to apply to the spectra in NIR. It is the Detrend.
Normally goes together with the SNV, but this time I´m going to apply it alone.
I´m going to use the Yarn data, with this raw spectra:

Now we load the R package "pracma":
wavelengths1<-seq(1,268,by=1)  #para "yarn"
The spectra change to this one:
We can see hou the "trend" effect ( a shift in the baseline) is corrected and the baseline adjusted.


No hay comentarios:

Publicar un comentario