dpt_modules | R Documentation |
Apply one or more data pre-treatment modules to the dataset.
The data pre-treatment (dpt.pre
) can happen right after a
(possible) wavelength-split and before a (possible) splitting of the
dataset according to the provided split-variables below dpt.pre
, being
csAvg, noise and exOut, and / or after the splitting of the dataset
(dpt.post
), in other words as a final treatment to a dataset in each
'row' of the 'cube', i.e. in each 'cube-element'.
sgol |
Transform the dataset using the Savitzy-Golay
filter by calling
|
snv |
Transform the dataset using standard normal
variation 'snv' by calling internally the function |
msc |
Transform the datset using multiplicative scatter
correction 'msc'
|
emsc |
Transform the datset using 'emsc'; internally the
function
|
osc |
Not yet implemented. |
deTr |
Transform the dataset by calling the de-Trend
function
Note that the single values have to be separated by a 'minus' ('-'). Please
see examples and |
gsd |
Transform the dataset using gap-segment
derivatives by calling internally the function |
Via the ... argument in the function getap
, the values
of both dpt.pre
and dpt.post
can be overridden. Via the
separator '@', additional values can be appended to some of the single modules.
Possible values for dpt-modules are 'sgol', 'snv', 'msc', 'emsc', 'osc', 'deTr', 'gsd'. Single
modules can be combined and repeated in any arbitrary order, i.e. there is no
upper limit on the modules that can be applied in the 'dpt.pre' and 'dpt.post'
process – see examples.
Please see the description and split_dataset
to understand
when in the data-processing procedure the respective data treatment
modules are applied!
split_dataset
, anproc_file
,
getcd
for extracting a dataset from a 'cube' object,
do_avg
for averaging datasets into a single spectrum,
getcm
for extracting a specific model from a 'cube' object.
Other dpt modules documentation:
do_detrend()
,
do_emsc()
,
do_gapDer()
,
do_msc()
,
do_sgolay()
,
do_snv()
Other Data pre-treatment functions:
[,aquap_data-method
,
do_addNoise()
,
do_avg()
,
do_blowup()
,
do_detrend()
,
do_emsc()
,
do_gapDer()
,
do_msc()
,
do_resampleNIR()
,
do_sgolay()
,
selectWls()
,
ssc()
## Not run:
fd <- gfd() # load a dataset
cube <- gdmm(fd) # you should split in at least 2 or 3 groups
cube # look at the structure - each row of the cube is treated separately using
# the modules specified in 'dpt.pre' and 'dpt.post' -- see description
####
## the argument 'dpt.pre' resp. 'dpt.post' in the analysis procedure could look
## like this:
dpt.pre <- c("sgol@2-51-0")
dpt.post <- c("sgol@2-51-0", "snv")
dpt.pre <- c("msc", "snv", "msc") # (of course not useful, but it shows that
## modules can be combined and repeated in any arbitrary order.)
dpt.post <- "msc@myDS" # with 'myDS' being the name of a standard dataset
dpt.post <- c("sgol@2-51-0", "emsc@myDF") # with 'myDF' being the name of a
## data frame containing one or two loading vectors or one regression vector
dpt.post <- "gsd@1-11-13-1"
dpt.post <- "deTr" # use whole wavelength range as source and target
dpt.post <- "deTr@1300-1600" # same target as source
dpt.pre <- c("sgol", "deTr@1300-1600-all") # apply de-trend calculated from
# 1300nm to 1600nm to all wavelengths
####
cube <- gdmm(fd, getap(dpt.pre=c("sgol", "snv"))) # modify via gdmm function
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.