BasicModelInitializer#
- class lsst.meas.extensions.multiprofit.fit_coadd_multiband.BasicModelInitializer(*, inputs: dict[str, ~typing.Any] = <factory>, priors_shape_mag: dict = <factory>)#
Bases:
ModelInitializerA generic model initializer that should work on most kinds of models with a single source.
Attributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].Methods Summary
get_centroid_and_shape(source, catexps, ...)Get the centroid and shape for a source.
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.
initialize_model(model, source, catexps, ...)Initialize a MultiProFit model for a single object corresponding to a row in a catalog.
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].
Methods Documentation
- get_centroid_and_shape(source: Mapping[str, Any], catexps: list[CatalogExposureSourcesABC], config_data: CatalogSourceFitterConfigData, values_init: Mapping[ParameterD, float] | None = None) tuple[tuple[float, float], tuple[float, float, float]]#
Get the centroid and shape for a source.
Parameters#
- source
A mapping with fields expected to be populated in the corresponding source catalog for initialization.
- catexps
A list of (source and psf) catalog-exposure pairs.
- config_data
Configuration settings and data for fitting and output.
- values_init
Initial parameter values from the model configuration.
Returns#
- centroid
The x- and y-axis centroid values.
- sig_x, sig_y, rho
The x- and y-axis Gaussian sigma and rho values defining the estimated elliptical shape of the source.
- 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.
- initialize_model(model: ModelD | ModelF, source: Mapping[str, Any], catexps: list[CatalogExposureSourcesABC], config_data: CatalogSourceFitterConfigData, values_init: Mapping[ParameterD, float] | None = None, **kwargs)#
Initialize a MultiProFit model for a single object corresponding to a row in a catalog.
Parameters#
- model
The model to initialize parameter values for.
- source
A mapping with fields expected to be populated in the corresponding source catalog for initialization.
- catexps
Per-band catalog-exposure pairs.
- config_data
Fitter configuration and data.
- values_init
Default initial values for parameters.
- **kwargs
Additional keyword arguments for any purpose.