Skip to contents

Returns lower and upper bounds for each parameter, used to constrain optimization during deconvolution.

Usage

peak_model_bounds(model, x_range, y_range)

Arguments

model

A peak_model object.

x_range

Numeric vector of length 2 giving the x-axis range (min, max).

y_range

Numeric vector of length 2 giving the y-axis range (min, max).

Value

A list with two components:

  • lower: Named numeric vector of lower bounds

  • upper: Named numeric vector of upper bounds

Examples

model <- create_peak_model("gaussian")
bounds <- peak_model_bounds(model, c(0, 20), c(0, 100))
bounds$lower
#> height center  width 
#>  0.000  0.000  0.001 
bounds$upper
#> height center  width 
#>    150     20     10