coolest.template.classes.parameter#
Classes#
Base class of a generic model parameter. |
|
Define a non-linear parameter of a lens model |
|
Define a hyper-parameter of a lens model |
|
Define a hyper-parameter of a model |
|
Typically for analytical basis sets. |
|
Typically for position of point sources. |
|
Typically for pixelated profiles |
|
Typically for pixelated profiles |
Module Contents#
- class Parameter(documentation: str, definition_range: DefinitionRange = None, units: str = None, fixed: bool = False, point_estimate: PointEstimate = None, posterior_stats: coolest.template.classes.probabilities.PosteriorStatistics = None, prior: coolest.template.classes.probabilities.Prior = None, latex_str: str = None)[source]#
Base class of a generic model parameter.
- Parameters:
documentation (str) – Short description of the parameter.
definition_range (DefinitionRange, optional) – Interval over which the parameter is defined, by default None
units (str, optional) – Unit of the parameter, if any, by default None
fixed (bool, optional) – If True, the parameter is considered fixed (i.e. should not be, or has not be optimized), by default False
point_estimate (PointEstimate, optional) – Point-estimate value of the parameter, by default None
posterior_stats (PosteriorStatistics, optional) – Summary statistics of the marginalized posterior distribution of the parameter, by default None
prior (Prior, optional) – Prior assigned the parameter, if any, by default None
latex_str (str, optional) – LaTeX representation of the parameter, by default None
#TODO (for parameters like orientation / axis ratio, add a class method to compute) – related quantities like ellipticity parameters.
- set_point_estimate(point_estimate)[source]#
Set the point estimate value of the parameter.
- Parameters:
point_estimate (int, float, list, PointEstimate) – Parameter value, or directly a PointEstimate instance.
- Raises:
ValueError – If the provided point_estimate has not a supported type.
ValueError – If the parameter value is below its minimum allowed value.
ValueError – If the parameter value is above its maximum allowed value.
- set_posterior(posterior_stats)[source]#
Set the posterior statistics of the parameter.
- Parameters:
posterior_stats (PosteriorStatistics) – Instance of the PosteriorStatistics object.
- Raises:
ValueError – If the argument is not a PosteriorStatistics instance.
- class NonLinearParameter(*args, **kwargs)[source]#
Define a non-linear parameter of a lens model
Warning: this class may be removed in the future.
- class LinearParameter(*args, **kwargs)[source]#
Define a hyper-parameter of a lens model
Warning: this class may be removed in the future, as it adds an unnecessary abstraction level.
- class LinearParameterSet(*args, **kwargs)[source]#
Typically for analytical basis sets.
Warning: this class may be removed in the future, as it adds an unnecessary abstraction level.
- class NonLinearParameterSet(*args, **kwargs)[source]#
Typically for position of point sources.
Warning: this class may be removed in the future, as it adds an unnecessary abstraction level.