CachedBasicModelInitializer#

class lsst.meas.extensions.multiprofit.fit_coadd_multiband.CachedBasicModelInitializer(*, inputs: dict[str, ~typing.Any] = <factory>, priors_shape_mag: dict = <factory>, priors: tuple[~lsst.gauss2d.fit._gauss2d_fit.Prior, ...], sources: tuple[~lsst.gauss2d.fit._gauss2d_fit.Source, ...])#

Bases: BasicModelInitializer

A basic initializer with a cached list of model sources and priors.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

params_init

Return a cached reference to the result of _get_params_init.

priors_type

Return a cached reference to the result of _get_priors_type.

Methods Summary

get_params_init(model)

Return the free and/or centroid parameters for a model.

get_priors_type(model)

Return the list of priors of known type, by type.

Attributes Documentation

model_config: ClassVar[pydantic.ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

params_init#

Return a cached reference to the result of _get_params_init.

priors_type#

Return a cached reference to the result of _get_priors_type.

Methods Documentation

get_params_init(model: ModelD | ModelF) tuple[ParameterD]#

Return the free and/or centroid parameters for a model.

Parameters#

model

The model to return parameters for.

Returns#

parameters

The ordered list of parameters for the model.

get_priors_type(model: ModelD | ModelF) tuple[tuple[GaussianPrior], tuple[ShapePrior]]#

Return the list of priors of known type, by type.

Parameters#

model

The model to return priors for.

Returns#

priors_gauss

A list of all of the Gaussian priors, in the order they occurred.

priors_shape

A list of all of the shape priors, in the order they occurred.