Skip to contents

Implements the signal model discussed in `spectralem()`. Doesn't include any \(f_i\).

Parameters are passed in a list params with components amp, pos, gwidth and lwidth which are vectors of the same length. For each the i-th entry yields the parameters of the i-th Voigt profile. Furthermore named components a and b describe the slope and offset of the linear background respectively. See examples.

Usage

voigt.model(x, params)

Arguments

x

vector of x coordinates the model is to be evaluated at

params

parameter list as described in the description

Examples

y <- voigt.model(
  x = seq(0, 1000),
  params = list(
    amp = c(10, 2, 3, 3),
    pos = c(332, 577, 697),
    gwidth = c(5, 5, 5),
    lwidth = c(0.1, 0.1, 0.1),
    a = 0.01,
    b = 15
  )
)