setupRSPA <-
function(ppm){
# setup of alignment parameters
# input: ppm - chemical shift scale
# L. Hedjazi, ICAN, 2013
MAX_DIST_FACTOR<-numeric()
MIN_RC<-numeric()
# Configuration of the algorithm invariant parameters
configureRSPA(ppm)
### These parameters can be changed to improve the algorithm performance
#################### Recursive alignment parameters ########################
recursion$resamblance<-0.95 # Stop criterium of the recursion indicating
#the complete alignment of segment peaks
# default 98#
######################## Segmentation parameters############################
peakParam$ppmDist <- 0.03# (ppm) #distance to concatenate adjacent peaks
#to represent a multiplet in a single segment ### default 0.03#
peakParam$ampThr <- 0.3 # amplitude value to threshold small peaks #
#[] - automatic determination based on the 5# of the most intensive peaks
############Prevention of Misalignment on a local scale##############
recursion$segShift<-0.02#(ppm) max peak shift for large peaks
recursion$inbetweenShift<-0.02 #(ppm) max shift for small peaks
recursion$acceptance<-0.5 # if resemblance after the alignment between modified test
#and reference segments is less than the acceptance value, the alignment is not accepted.
#Higher value is more stringent, and align only highly resemble peaks.
if (!missing(ppm)){
peakParam$ppmDist<-ppmToPt(peakParam$ppmDist,0,ppm[2]-ppm[1])
recursion$segShift<-ppmToPt(recursion$segShift,0,ppm[2]-ppm[1])
recursion$inbetweenShift<-ppmToPt(recursion$inbetweenShift,0,ppm[2]-ppm[1])}
assign("peakParam", peakParam,envir = parent.frame())
assign("recursion", recursion,envir = parent.frame())
assign("MAX_DIST_FACTOR", MAX_DIST_FACTOR,envir = parent.frame())
assign("MIN_RC", MIN_RC,envir = parent.frame())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.