Polynomial¶
- class paintbox.Polynomial(wave, degree, pname=None, zeroth=True)[source] [edit on github]¶
Bases:
paintbox.sed.PaintboxBasePolynomial SED component.
This class produces Legendre polynomials that can be either added or multiplied with other SED components.
- Attributes
- wave: ndarray, Quantity
Wavelength array of the polynomials
- degree: int
Order of the Legendre polynomial.
- poly: 2D ndarray
Static Legendre polynomials array used in the calculations.
- pname: str (optional)
Name of the polynomial to be used in parnames.
- zeroth: bool (optional)
Controls used of zeroth order polynomial. Default is True (zero order is used).
Attributes Summary
List with names of the parameters of the model.
Methods Summary
__call__(theta)Calculation of the polynomial with weights theta.
Constrain the parameters with the same name to have the same value during calling.
fix(fixed_vals)Fix a set of parameters in parnames using a dictionary.
gradient(theta)Gradient of the polynomial with weights theta.
plot(theta[, ax, plottype])Plot the model for a given set of parameters.
Attributes Documentation
- parnames¶
List with names of the parameters of the model.
Methods Documentation
- __call__(theta)[source] [edit on github]¶
Calculation of the polynomial with weights theta.
- constrain_duplicates() [edit on github]¶
Constrain the parameters with the same name to have the same value during calling.
- fix(fixed_vals) [edit on github]¶
Fix a set of parameters in parnames using a dictionary.
- gradient(theta)[source] [edit on github]¶
Gradient of the polynomial with weights theta.
- plot(theta, ax=None, plottype=None, **kwargs) [edit on github]¶
Plot the model for a given set of parameters.