pub struct VillarFit { /* private fields */ }
Expand description

Villar function fit

Seven fit parameters and goodness of fit (reduced $\chi^2$) of the Villar function developed for supernovae classification:

$$ f(t) = c + \frac{A}{ 1 + \exp{\frac{-(t - t_0)}{\tau_\mathrm{rise}}}} \left\{ \begin{array}{ll} 1 - \frac{\nu (t - t_0)}{\gamma}, &t < t_0 + \gamma \\ (1 - \nu) \exp{\frac{-(t-t_0-\gamma)}{\tau_\mathrm{fall}}}, &t \geq t_0 + \gamma \end{array} \right. $$ where $A, \gamma, \tau_\mathrm{rise}, \tau_\mathrm{fall} > 0$, $\nu \in [0; 1)$.

Here we introduce a new dimensionless parameter $\nu$ instead of the plateau slope $\beta$ from the orioginal paper: $\nu \equiv -\beta \gamma / A$.

Note, that the Villar function is developed to be used with fluxes, not magnitudes.

  • Depends on: time, magnitude, magnitude error
  • Minimum number of observations: 8
  • Number of features: 8

Villar et al. 2019 DOI:10.3847/1538-4357/ab418c

Implementations

New VillarFit instance

algorithm specifies which optimization method is used, it is an instance of the CurveFitAlgorithm, currently supported algorithms are MCMC and LMSDER (a Levenberg–Marquard algorithm modification, requires gsl Cargo feature).

ln_prior is an instance of LnPrior and specifies the natural logarithm of the prior to use. Some curve-fit algorithms doesn’t support this and ignores the prior

Default McmcCurveFit for VillarFit

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Get feature evaluator meta-information
Size of vectors returned by eval(), get_names() and get_descriptions() Read more
Minimum time series length required to successfully evaluate feature
If time array used by the feature
If magnitude array is used by the feature
If weight array is used by the feature
If feature requires time-sorting on the input TimeSeries
Vector of feature values or EvaluatorError
Returns vector of feature values and fill invalid components with given value
Checks if TimeSeries has enough points to evaluate the feature
Vector of feature names. The length and feature order corresponds to eval() output Read more
Vector of feature descriptions. The length and feature order corresponds to eval() output Read more
Converts to this type from the input type.
The name of the generated JSON Schema. Read more
Generates a JSON Schema for this type. Read more
Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
The error type produced by a failed conversion.
Convert the given value into an approximately equivalent representation.
The error type produced by a failed conversion.
Convert the subject into an approximately equivalent representation.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Approximate the subject with the default scheme.
Approximate the subject with a specific scheme.
Approximate the subject to a given type with the default scheme.
Approximate the subject to a given type with a specific scheme.
Convert the subject to a given type.
Attempt to convert the subject to a given type.
Attempt a value conversion of the subject to a given type.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The error type produced by a failed conversion.
Convert the given value into the subject type.
The type returned in the event of a conversion error.
Performs the conversion.
The error type produced by a failed conversion.
Convert the subject into the destination type.
The type returned in the event of a conversion error.
Performs the conversion.
The error type produced by a failed conversion.
Convert the given value into an exactly equivalent representation.
The error type produced by a failed conversion.
Convert the subject into an exactly equivalent representation.