lsst.gauss2d.fit g199a45376c+3b7b3fd841
 
Loading...
Searching...
No Matches
lsst::gauss2d::fit::GaussianComponent Class Reference

#include <gaussiancomponent.h>

Inheritance diagram for lsst::gauss2d::fit::GaussianComponent:
lsst::gauss2d::fit::GaussianParametricEllipseHolder lsst::gauss2d::fit::EllipticalComponent lsst::gauss2d::fit::Component lsst::gauss2d::fit::ParametricModel lsst::gauss2d::fit::Parametric

Public Member Functions

 GaussianComponent (std::shared_ptr< GaussianParametricEllipse > ellipse=nullptr, std::shared_ptr< CentroidParameters > centroid=nullptr, std::shared_ptr< IntegralModel > integralmodel=nullptr)
 
void add_extra_param_map (const Channel &channel, ExtraParamMap &map_extra, const GradParamMap &map_grad, ParameterMap &offsets) const override
 
void add_extra_param_factors (const Channel &channel, ExtraParamFactors &factors) const override
 
void add_grad_param_map (const Channel &channel, GradParamMap &map, ParameterMap &offsets) const override
 
void add_grad_param_factors (const Channel &channel, GradParamFactors &factor) const override
 
std::unique_ptr< const lsst::gauss2d::Gaussians > get_gaussians (const Channel &channel) const override
 
size_t get_n_gaussians (const Channel &channel) const override
 Return the number of Gaussian sub-components controlled by this model.
 
ParamRefs & get_parameters (ParamRefs &params, ParamFilter *filter=nullptr) const override
 
ParamCRefs & get_parameters_const (ParamCRefs &params, ParamFilter *filter=nullptr) const override
 Same as get_parameters(), but for const refs.
 
void set_extra_param_factors (const Channel &channel, ExtraParamFactors &factors, size_t index) const override
 
void set_grad_param_factors (const Channel &channel, GradParamFactors &factors, size_t index) const override
 
std::string repr (bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
 
std::string str () const override
 
- Public Member Functions inherited from lsst::gauss2d::fit::EllipticalComponent
 EllipticalComponent (std::shared_ptr< ParametricEllipse > ellipse, std::shared_ptr< CentroidParameters > centroid=nullptr, std::shared_ptr< IntegralModel > integralmodel=nullptr)
 
const CentroidParametersget_centroid () const
 Get the centroid Parameter container.
 
const ParametricEllipseget_ellipse () const
 Get the ellipse Parameter container.
 
const IntegralModelget_integralmodel () const override
 
std::string repr (bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
 
std::string str () const override
 
- Public Member Functions inherited from lsst::gauss2d::fit::Parametric
ParamRefs get_parameters_new (ParamFilter *filter=nullptr) const
 Same as get_parameters(), but returning a new vector.
 
ParamCRefs get_parameters_const_new (ParamFilter *filter=nullptr) const
 Same as get_parameters_const(), but returning a new vector.
 

Static Public Member Functions

static std::vector< std::shared_ptr< Component > > make_uniq_default_gaussians (const std::vector< double > &sizes={2.}, bool fixed=true)
 

Additional Inherited Members

- Protected Attributes inherited from lsst::gauss2d::fit::EllipticalComponent
std::shared_ptr< ParametricEllipse_ellipse
 
std::shared_ptr< CentroidParameters_centroid
 
std::shared_ptr< IntegralModel_integralmodel
 

Detailed Description

A Component consisting of a 2D Gaussian.

Constructor & Destructor Documentation

◆ GaussianComponent()

lsst::gauss2d::fit::GaussianComponent::GaussianComponent ( std::shared_ptr< GaussianParametricEllipse > ellipse = nullptr,
std::shared_ptr< CentroidParameters > centroid = nullptr,
std::shared_ptr< IntegralModel > integralmodel = nullptr )
explicit

Construct a GaussianComponent from ellipse, centroid and integral parameters.

Parameters
ellipseThe GaussianParametricEllipse value; default-initialized if null.
centroidThe CentroidParameters value; default-initialized if null.
integralmodelThe IntegralModel value; default-initialized if null.

Member Function Documentation

◆ add_extra_param_factors()

void lsst::gauss2d::fit::GaussianComponent::add_extra_param_factors ( const Channel & channel,
ExtraParamFactors & factors ) const
overridevirtual

Add extra Parameter gradient factors to an existing vector.

Parameters
channelThe Channel to add factors for.
factorsThe ExtraParamFactors to add to.

Implements lsst::gauss2d::fit::ParametricModel.

◆ add_extra_param_map()

void lsst::gauss2d::fit::GaussianComponent::add_extra_param_map ( const Channel & channel,
ExtraParamMap & map_extra,
const GradParamMap & map_grad,
ParameterMap & offsets ) const
overridevirtual

Add extra Parameter indices to a map.

Parameters
channelThe Channel to add indices for.
map_extraThe ExtraParamMap to add to.
map_gradThe completed GradParamMap.
offsetsA map of index offsets for Parameters that have already been added.

Implements lsst::gauss2d::fit::ParametricModel.

◆ add_grad_param_factors()

void lsst::gauss2d::fit::GaussianComponent::add_grad_param_factors ( const Channel & channel,
GradParamFactors & factors ) const
overridevirtual

Add Parameter gradient factors to an existing map.

Parameters
channelThe Channel to add factors for.
factorsThe GradParamFactors to add to.

Implements lsst::gauss2d::fit::ParametricModel.

◆ add_grad_param_map()

void lsst::gauss2d::fit::GaussianComponent::add_grad_param_map ( const Channel & channel,
GradParamMap & map,
ParameterMap & offsets ) const
overridevirtual

Add Parameter gradient indices to an existing map.

Parameters
channelThe Channel to add indices for.
mapThe map to add to.
offsetsA map of index offsets for Parameters that have already been added.

Implements lsst::gauss2d::fit::ParametricModel.

◆ get_gaussians()

std::unique_ptr< const lsst::gauss2d::Gaussians > lsst::gauss2d::fit::GaussianComponent::get_gaussians ( const Channel & channel) const
overridevirtual

Return the vector of Gaussian sub-components controlled by this model.

Parameters
channelThe Channel to return Gaussians for.
Returns
The Gaussians controlled by this model.

Implements lsst::gauss2d::fit::ParametricModel.

◆ get_n_gaussians()

size_t lsst::gauss2d::fit::GaussianComponent::get_n_gaussians ( const Channel & channel) const
overridevirtual

Return the number of Gaussian sub-components controlled by this model.

Implements lsst::gauss2d::fit::ParametricModel.

◆ get_parameters()

ParamRefs & lsst::gauss2d::fit::GaussianComponent::get_parameters ( ParamRefs & params,
ParamFilter * filter = nullptr ) const
overridevirtual

Add Parameter refs matching the filter to a vector, in order.

Parameters
paramsThe vector to add to.
filterThe filter to apply to this Object's parameters.
Returns
A ref to params (for method chaining)

Reimplemented from lsst::gauss2d::fit::EllipticalComponent.

◆ get_parameters_const()

ParamCRefs & lsst::gauss2d::fit::GaussianComponent::get_parameters_const ( ParamCRefs & params,
ParamFilter * filter = nullptr ) const
overridevirtual

Same as get_parameters(), but for const refs.

Reimplemented from lsst::gauss2d::fit::EllipticalComponent.

◆ make_uniq_default_gaussians()

static std::vector< std::shared_ptr< Component > > lsst::gauss2d::fit::GaussianComponent::make_uniq_default_gaussians ( const std::vector< double > & sizes = {2.},
bool fixed = true )
inlinestatic

Construct a vector of default-initialized GaussianComponent instances.

Parameters
sizesVector of initial values for both sigma_x and sigma_y.
fixedWhether all Parameter members should be fixed initially.
Returns
A vector of GaussianComponent instances.
Note
This can be used to initialize a trivial PsfModel as a noralized, zero-size single Gaussian.

◆ set_extra_param_factors()

void lsst::gauss2d::fit::GaussianComponent::set_extra_param_factors ( const Channel & channel,
ExtraParamFactors & factors,
size_t index ) const
overridevirtual

Set extra Parameter gradient factors in an existing map.

Parameters
channelThe Channel to set factors for.
factorsThe ExtraParamFactors to set factors for.
indexThe index to begin setting factors at.

Implements lsst::gauss2d::fit::ParametricModel.

◆ set_grad_param_factors()

void lsst::gauss2d::fit::GaussianComponent::set_grad_param_factors ( const Channel & channel,
GradParamFactors & factors,
size_t index ) const
overridevirtual

Set Parameter gradient factors in an existing map.

Parameters
channelThe Channel to set factors for.
factorsThe GradParamFactors to set factors for.
indexThe index to begin setting factors at.

Implements lsst::gauss2d::fit::ParametricModel.


The documentation for this class was generated from the following files: