ComponentGroupConfig#

class lsst.multiprofit.ComponentGroupConfig(*args, **kw)#

Bases: Config

Configuration for a group of lsst.gauss2d.fit Components.

ComponentGroups may have linked CentroidParameters and IntegralModels, e.g. if is_fractional is True.

Notes#

Gaussian components are generated first, then Sersic.

This config class has no equivalent in gauss2d_fit, because gauss2d_fit model parameter dependencies implicitly. This class implements only a subset of typical use cases, i.e. PSFs sharing a fractional integral model with fixed unit flux, and galaxies/PSF components sharing a single common centroid. If greater flexibility in linking parameter values is needed, users must assemble their own gauss2d_fit models directly.

Attributes Summary

centroids

Centroids by key, which can be a component name or 'default'.The 'default' key-value pair must be specified if it is needed.

components_gauss

Gaussian Components in the source (ConfigDict, default {})

components_sersic

Sersic Components in the component mixture (ConfigDict, default {})

is_fractional

Whether the integral_model is fractional (bool, default False)

transform_flux_name

The name of the reference transform for flux parameters (str, default 'log10')

transform_fluxfrac_name

The name of the reference transform for flux parameters (str, default 'logit_fluxfrac')

Methods Summary

format_label(label, name_component)

get_component_configs()

get_fluxes_default(channels, component_configs)

Get default flux values for a ComponentConfigs instance.

get_integral_label_default()

make_components(component_fluxes[, ...])

Make a list of lsst.gauss2d.fit.Component from this configuration.

validate()

Validate the Config, raising an exception if invalid.

Attributes Documentation

centroids#

Centroids by key, which can be a component name or ‘default’.The ‘default’ key-value pair must be specified if it is needed. (ConfigDict, default {'default': <class 'lsst.multiprofit.componentconfig.CentroidConfig'>})

components_gauss#

Gaussian Components in the source (ConfigDict, default {})

components_sersic#

Sersic Components in the component mixture (ConfigDict, default {})

is_fractional#

Whether the integral_model is fractional (bool, default False)

transform_flux_name#

The name of the reference transform for flux parameters (str, default 'log10')

transform_fluxfrac_name#

The name of the reference transform for flux parameters (str, default 'logit_fluxfrac')

Methods Documentation

static format_label(label: str, name_component: str) str#
get_component_configs() dict[str, EllipticalComponentConfig]#
static get_fluxes_default(channels: tuple[Channel], component_configs: dict[str, EllipticalComponentConfig], is_fractional: bool = False) list[dict[Channel, float]]#

Get default flux values for a ComponentConfigs instance.

Parameters#

channels

A tuple of channels to populate with flux values.

component_configs

A dict of named EllipticalComponentConfigs to provide initial flux values for.

is_fractional

Whether to return values for a fractional model. If True, all components must have a fluxfrac config set and the first must also have a valid flux config.

Returns#

fluxes

A dict of flux values by channel for each component.

static get_integral_label_default() str#
make_components(component_fluxes: list[dict[Channel, float]], label_integral: str | None = None) tuple[list[Component], list[Prior]]#

Make a list of lsst.gauss2d.fit.Component from this configuration.

Parameters#

component_fluxes

A list of Fluxes to populate an appropriate lsst.gauss2d.fit.IntegralModel with. If self.is_fractional, the first item in the list must be total fluxes while the remainder are fractions (the final fraction is always fixed at 1.0 and must not be provided).

label_integral

A label to apply to integral parameters. Can reference the relevant component name with ${name_component}}.

Returns#

componentdata

An appropriate ComponentData including the initialized component.

validate() None#

Validate the Config, raising an exception if invalid.

Raises#

lsst.pex.config.FieldValidationError

Raised if verification fails.

Notes#

The base class implementation performs type checks on all fields by calling their validate methods.

Complex single-field validation can be defined by deriving new Field types. For convenience, some derived lsst.pex.config.Field-types (ConfigField and ConfigChoiceField) are defined in lsst.pex.config that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete.