Description Usage Arguments Details Value References See Also Examples
Performs modelbased background correction and normalisation of spectra. EMSC handles variations in scaling, polynomial baselines and interferents. Parameters for corrections are stored for further analysis, and spectra are corrected accordingly.
1 
X 

model 
an EMSC model to use instead of the other parameters. 
... 
named model parameters for EMSC_model. 
This is the main EMSC function performing all calculations. It can be run with
no parameters (defaults are used), with a predefined EMSC model object or with
parameters that are passed on to the EMSC model building function EMSC_model
.
An object of class EMSC is returned. This contains:
corrected
: matrix
of corrected spectra.
parameters
: matrix
of fitted parameter values.
model
: object containing input all input parameters.
X
: original data.
H. Martens, E. Stark, Extended multiplicative signal correction and spectral interference subtraction: new preprocessing methods for near infrared spectroscopy. J Pharm Biomed Anal. 1991; 9(8):62535.
EMSC_model
predict.EMSC
plot.EMSC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  data(fishoil)
Raman < fishoil$Raman[, 850:3300]
EMSC.basic < EMSC(Raman)
EMSC.poly6 < EMSC(Raman, degree = 6)
EMSC.rep < EMSC(Raman, degree = 6, reference = Raman[30, ],
replicates = fishoil$replicates)
## Not run:
old.par < par(mfrow = c(2,2), mar = c(4,4,1,1))
xlim < rev(as.numeric(range(colnames(Raman))))
matplot(colnames(Raman), t(Raman), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Raw spectra')
matplot(colnames(Raman), t(EMSC.basic$corrected), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Corrected (basic)')
matplot(colnames(Raman), t(EMSC.poly6$corrected), type = 'l', xlim = xlim,
ylab = 'Relative intensity', xlab = 'Corrected (6th degree polynomial)')
matplot(colnames(Raman), t(EMSC.rep$corrected), type = 'l', xlim = xlim,
ylab = 'Relative intensity',
xlab = 'Corrected (reference = spec. #30, replicate correction (90%))')
par(old.par)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.