SpectrumSmoothMarkov {Peaks}R Documentation

Suppression of statistical fluctuations with discrete Markov chain.

Description

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

Usage

SpectrumSmoothMarkov(y,window=3)

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:

sum_{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 sum_{k=1}^{m}exp ( frac{y(i pm k)-y(i)}{y(i pm k)+y(i)})

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.


[Package Peaks version 0.2 Index]