func_pseudoVoigt: Calculate Pseudo-Voigt Using Numerical Approximation

Description Usage Arguments Value Examples

View source: R/PeakFunctions_func_pseudoVoigt.R

Description

Calculates the linear combination of gaussian and lorentzian peaks with normalization factor

Usage

1
func_pseudoVoigt(x, sigma, gamma, mu, probDensity, k)

Arguments

x

a vector of x-coordinates from which the corrisponding y-coordinates are calculated

sigma

the standard deviation of the gaussian

gamma

the lorentzian scale parameter specifying the half-width at half-maximum (HWHM)

mu

the mean

probDensity

Should the function produce a probability density function 'TRUE' a peak 'FALSE' with amplitude k? default is 'TRUE'.

k

Amplitude of the peak. Only used when 'probDensity == FALSE'

Value

a vector of y-coordinates the same length as x

Examples

1
2
3
4
5
6
7
xVec <- seq(from = 1, to = 100, by = 0.1)
pdensity <- func_pseudoVoigt(x = xVec, mu = 10, sigma = 1, gamma = 1.5, probDensity = TRUE)
p1 <- plot(x = xVec, y = pdensity)

#Pseudo-Voigt Peak
pdensity <- func_pseudoVoigt(x = xVec, mu = 10, sigma = 1, gamma = 1.5, probDensity = FALSE, k = 10)
p2 <- plot(x = xVec, y = pdensity)

pmbrophy/SummitR documentation built on May 20, 2020, 12:36 a.m.