NonParametricModel

class paintbox.NonParametricModel(wave, templates, names=None)[source] [edit on github]

Bases: paintbox.sed.PaintboxBase

Weighted linear combination of SED models.

This class allows the combination of a set of templates based on different weights.

Attributes
parnames: list

Name of the templates.

Parameters
wave: ndarray, Quantity

Common wavelenght array of all templates.

templates: 2D ndarray

SED models with dimensions (N, len(wave)), where N=number of templates.

names: list

Name of the templates. Defaults to [temp, …, tempN]

Methods Summary

__call__(theta)

Returns the dot product of a vector theta with the templates.

gradient(theta)

Gradient of the dot product with weights theta.

Methods Documentation

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

Returns the dot product of a vector theta with the templates.

Parameters
theta: ndarray

Vector with weights of the templates.

Returns

Dot product of theta with templates.

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

Gradient of the dot product with weights theta.

This routine returns simply the templates, but it has an argument theta only to keep calls consistently across different SED components.