Shift

class astropy.modeling.functional_models.Shift(offset=0, **kwargs)[source]

Bases: astropy.modeling.Fittable1DModel

Shift a coordinate.

Parameters
offsetfloat

Offset to add to a coordinate.

Attributes Summary

input_units

This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or None if any units are accepted).

linear

offset

param_names

Names of the parameters that describe models of this type.

Methods Summary

evaluate(x, offset)

One dimensional Shift model function

fit_deriv(x, *params)

One dimensional Shift model derivative with respect to parameter

sum_of_implicit_terms(x)

Evaluate the implicit term (x) of one dimensional Shift model

Attributes Documentation

input_units
linear = True
offset = Parameter('offset', value=0.0)
param_names = ('offset',)

Names of the parameters that describe models of this type.

The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.

When defining a custom model class the value of this attribute is automatically set by the Parameter attributes defined in the class body.

Methods Documentation

static evaluate(x, offset)[source]

One dimensional Shift model function

static fit_deriv(x, *params)[source]

One dimensional Shift model derivative with respect to parameter

static sum_of_implicit_terms(x)[source]

Evaluate the implicit term (x) of one dimensional Shift model