CurveFitParameters.ParameterType

Type for a model parameter.

Fields:

  • name::String: The name of the parameter.
  • value::Float64: The current value of the parameter.
  • lower_bound::Float64: The lower bound.
  • upper_bound::Float64: The upper bound.
  • vary::Bool: Whether or not to vary the parameter during optimization.

Constructor:

Parameter(;name=nothing, value::Real, lower_bound::Real=-Inf, upper_bound::Real=Inf, vary::Bool=true)

Construct a new parameter. The parameter name does not have to be provided and will be automatically set if using the dictionary interface.

CurveFitParameters.ParametersType
Parameters(x::AbstractVector{<:Real}, names::AbstractVector{<:AbstractString}, lower_bounds=nothing, upper_bounds=nothing, vary=nothing)

Constructor from vectors.

CurveFitParameters.ParametersType

Type for a set of model parameters - wraps an OrderedDict{String, Parameter}. Implements the AbstractDict interface. Single Parameter's can be accessed via params.name or params["name"].

Constructor:

Parameters()

Constructs an empty set of parameters.

Parameters(x::AbstractVector{<:Real}, names::AbstractVector{<:AbstractString}, lower_bounds=nothing, upper_bounds=nothing, vary=nothing)

Construct a set of parameters from Vector's.

CurveFitParameters.is_variedMethod
is_varied(par::Parameter)

Returns true if the Parameter's vary field is true and if lower_bound != upper_bound.

CurveFitParameters.set_values!Method
set_values!(pars::Parameters, x::AbstractVector{<:Real})
set_values!(pars::Parameters, x::Real)

Sets the values of each parameter to the value in x.

CurveFitParameters.to_vecsMethod
to_vecs(pars::Parameters)

Unpacks the parameter fields to Vector's. Returns a NamedTuple with fields names, values, lower_bounds, upper_bounds, vary.