Polynomial

class paintbox.Polynomial(wave, degree, pname=None, zeroth=True)[source] [edit on github]

Bases: paintbox.sed.PaintboxBase

Polynomial 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.

parnames: list

List with the name of the individual polynomials, set to [p0, p1, …, pdegree] at initialization.

Parameters
wave: ndarray, Quantity

Wavelength array of the polynomials

degree: int

Order of the Legendre polynomial

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).

Methods Summary

__call__(theta)

Calculation of the polynomial with weights theta.

gradient(theta)

Gradient of the polynomial with weights theta.

Methods Documentation

__call__(theta)[source] [edit on github]

Calculation of the polynomial with weights theta.

gradient(theta)[source] [edit on github]

Gradient of the polynomial with weights theta.