background_removal: Perform background removal on the whole SERS spectrum data...

Description Usage Arguments Value Examples

View source: R/SABARSI.R

Description

Perform background removal on the whole SERS spectrum data set. Divide the SERS spectrum data into time-frequency blocks and remove background locally.

Usage

1
background_removal(x, q = 0.4, w.chan = 50, w.time = 50)

Arguments

x

A p*n data matrix. There are n SERS spectra with p frequency channels.

q

A number taking value between 0 and 1. 100*q is the quantile that SABARSI uses to calculate the spectrum strength.

w.chan

The window size for the frequency domain. The default value of w.chan is 50.

w.time

The window size for the time domain. The default value of w.time is 50.

Value

A p*n data matrix, xr, of background-removed spectra.

Examples

1
2
3
data(SERS)
x <- SERS$R1   ## x is the matrix of SERS spectra
xr <- background_removal(x) ## xr is the matrix of background removed spectra

sabarsi documentation built on Aug. 8, 2019, 5:02 p.m.