astropy:docs

parameters.Parameter

parameters.Parameter [edit on github]

Wraps individual parameters.

This class represents a model’s parameter (in a somewhat broad sense). It acts as both a descriptor that can be assigned to a class attribute to describe the parameters accepted by an individual model (this is called an “unbound parameter”), or it can act as a proxy for the parameter values on an individual model instance (called a “bound parameter”).

Parameter instances never store the actual value of the parameter directly. Rather, each instance of a model stores its own parameters as either hidden attributes or (in the case of ParametricModel) in an array. A bound Parameter simply wraps the value in a Parameter proxy which provides some additional information about the parameter such as its constraints.

Unbound Parameters are not associated with any specific model instance, and are merely used by model classes to determine the names of their parameters and other information about each parameter such as their default values and default constraints.

Parameters :

name : str

parameter name

default : float or array

default value to use for this parameter

getter : callable

a function that wraps the raw (internal) value of the parameter when returning the value through the parameter proxy (eg. a parameter may be stored internally as radians but returned to the user as degrees)

setter : callable

a function that wraps any values assigned to this parameter; should be the inverse of getter

fixed : bool

if True the parameter is not varied during fitting

tied : callable or False

if callable is supplied it provides a way to link the value of this parameter to another parameter (or some other arbitrary function)

min : float

the lower bound of a parameter

max : float

the upper bound of a parameter

model : object

an instance of a Model class; this should only be used internally for creating bound Parameters

Page Contents