baselineCorrect: generic function to perfom baseline correction

Description Usage Arguments Note Examples

Description

generic function to perfom baseline correction

Usage

1
2
3
4
5
baselineCorrect(object, ...)

## S4 method for signature 'SpectraInTime'
baselineCorrect(object, method = "modpolyfit",
  degree = 4, ...)

Arguments

object

a S4 class object

...

other parameters passed to baseline

method

method of baseline correction, default value is to 'modpolyfit', see baseline.modpolyfit

degree

numeric value, degree of the polynomial used only if method is code'modpolyfit'

Note

baseline correction in the wavelength domain by linking to the baseline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 spectralEx           <-  getSpectraInTimeExample()
 plot( spectralEx )   
 timeRange            <-  range( getTimePoints( spectralEx ) )
 timesToSelect        <-  e(  seq( timeRange[1] , timeRange[2] , length.out = 5  )   )
 baselineDefault      <-  baselineCorrect( spectralEx )
 baselineHighPolynomial  <-  baselineCorrect( spectralEx, 
   method = 'modpolyfit', degree = 4 )

 # filtering with fast fourier transform, not so good on example 
 baselineLowpass         <-  baselineCorrect( spectralEx , method = "lowpass" )

 # visual inspection
 plot( baselineDefault[ timesToSelect , ] , type = "time"  )
 plot( baselineHighPolynomial[ timesToSelect , ] , type = "time"  )
 plot( baselineLowpass[ timesToSelect , ] , type = "time"  ) 

spectralAnalysis documentation built on June 12, 2018, 5:04 p.m.