19/02/2012

Standard Normal Variate (SNV)

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 spectrum is calculated. The average value is substracted from the absorbance for every data point and the result is 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.
> X<-yarn$NIR
> Xt<-t(X)
> Xt_snv<-scale(Xt,center=TRUE,sd.scale=TRUE)
> wavelengths<-seq(1,268,by=1)
> matplot(wavelengths,(Xt_snv),lty=1,pch=21,
  + xlab="data_points(nm)",ylab="log(1/R)")

 Look at the Y axis and compare it with the data without SNV applied (Raw Yarn spectra):

No hay comentarios:

Publicar un comentario en la entrada