Learn R Programming

sabarsi (version 0.1.0)

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

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

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

Run this code
# NOT RUN {
data(SERS)
x <- SERS$R1   ## x is the matrix of SERS spectra
xr <- background_removal(x) ## xr is the matrix of background removed spectra
# }

Run the code above in your browser using DataLab