Legendre2D¶
-
class
astropy.modeling.polynomial.
Legendre2D
[source] [edit on github]¶ Bases:
astropy.modeling.polynomial.OrthoPolynomialBase
Legendre 2D polynomial.
Defined as:
\[P_{nm}(x,y) = C_{n_m} L_n(x ) L_m(y)\]Parameters: x_degree : int
degree in x
y_degree : int
degree in y
x_domain : list or None, optional
domain of the x independent variable
y_domain : list or None, optional
domain of the y independent variable
x_window : list or None, optional
range of the x independent variable
y_window : list or None, optional
range of the y independent variable
**params : dict
keyword: value pairs, representing parameter_name: value
Other Parameters: fixed : a dict
A dictionary
{parameter_name: boolean}
of parameters to not be varied during fitting. True means the parameter is held fixed. Alternatively thefixed
property of a parameter may be used.tied : dict
A dictionary
{parameter_name: callable}
of parameters which are linked to some other parameter. The dictionary values are callables providing the linking relationship. Alternatively thetied
property of a parameter may be used.bounds : dict
eqcons : list
A list of functions of length
n
such thateqcons[j](x0,*args) == 0.0
in a successfully optimized problem.ineqcons : list
A list of functions of length
n
such thatieqcons[j](x0,*args) >= 0.0
is a successfully optimized problem.Methods Summary
fit_deriv
(x, y, *params)Derivatives with respect to the coefficients. Methods Documentation
-
fit_deriv
(x, y, *params)[source] [edit on github]¶ Derivatives with respect to the coefficients. This is an array with Legendre polynomials:
Lx0Ly0 Lx1Ly0...LxnLy0...LxnLym
Parameters: x : ndarray
input
y : ndarray
input
params : throw away parameter
parameter list returned by non-linear fitters
Returns: result : ndarray
The Vandermonde matrix
-