Description Usage Arguments Value Examples
View source: R/PeakFunctions_func_pseudoVoigt.R
Calculates the linear combination of gaussian and lorentzian peaks with normalization factor
1 | func_pseudoVoigt(x, sigma, gamma, mu, probDensity, k)
|
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' |
a vector of y-coordinates the same length as x
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.