SpectrumSmoothMarkov: Suppression of statistical fluctuations with discrete Markov...

Description Usage Arguments Details Value Author(s) References

View source: R/zzz.R

Description

This function calculates smoothed spectrum from source spectrum based on Markov chain method.

Usage

1

Arguments

y

numeric vector of source spectrum

window

width of averaging smoothing window

Details

The algorithm is based on discrete Markov chain, which has very simple invariant distribution:

U_2=\frac{p_{1,2}}{p_{2,1}}U_1

U_3=\frac{p_{2,3}}{p_{3,2}}U_2 U_1

U_n=\frac{p_{n-1,n}}{p_{n,n-1}}U_{n-1} … U_2 U_1

and U_1 being defined from the normalization condition:

∑_{i=1}^{n}U_i=1

n is the length of the smoothed spectrum.

The probability of the change of the peak position from channel i to the channel i+1 is :

p_{i,i \pm 1}=A_i ∑_{k=1}^{m}exp ≤ft( \frac{y(i \pm k)-y(i)}{y(i \pm k)+y(i)}\right)

where A_i is the normalization constant so that:

p_{i,i-1}+p_{i,i+1}=1

and m is a width of smoothing window.

Value

Numeric vector with smoothed spectrum.

Author(s)

Miroslav Morhác

References

Z.K. Silagadze, A new algorithm for automatic photopeak searches. NIM A 376 (1996), 451.


Peaks documentation built on May 29, 2017, 8:29 p.m.