Struct light_curve_feature::features::VillarFit [−][src]
pub struct VillarFit { /* fields omitted */ }
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
pub fn new<VLP>(
algorithm: CurveFitAlgorithm,
ln_prior: VLP,
inits_bounds: VillarInitsBounds
) -> Self where
VLP: Into<VillarLnPrior>,
pub fn new<VLP>(
algorithm: CurveFitAlgorithm,
ln_prior: VLP,
inits_bounds: VillarInitsBounds
) -> Self where
VLP: Into<VillarLnPrior>,
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
Default [VillarLnPrior] for VillarFit
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
fn init_and_bounds_from_ts(
&self,
ts: &mut TimeSeries<'_, T>
) -> FitInitsBoundsArrays<NPARAMS>
fn convert_to_internal(
norm_data: &NormalizedData<f64>,
orig: &[f64; NPARAMS]
) -> [f64; NPARAMS]
fn convert_to_external(
norm_data: &NormalizedData<f64>,
params: &[f64; NPARAMS]
) -> [f64; NPARAMS]
Auto Trait Implementations
impl RefUnwindSafe for VillarFit
impl UnwindSafe for VillarFit
Blanket Implementations
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Convert the subject into an approximately equivalent representation.
Mutably borrows from an owned value. Read more
Approximate the subject with the default scheme.
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject with a specific scheme.
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
Attempt to convert the subject to a given type.