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

An IntegralModel that returns a Parameter-dependent fraction of the flux of another IntegralModel. More...

#include <fractionalintegralmodel.h>

Inheritance diagram for lsst::gauss2d::fit::FractionalIntegralModel:
lsst::gauss2d::fit::IntegralModel lsst::gauss2d::fit::Chromatic lsst::gauss2d::fit::Parametric lsst::gauss2d::fit::FractionalIntegralModel::Shared_enabler

Classes

struct  Shared_enabler
 

Public Types

typedef std::pair< std::reference_wrapper< const Channel >, std::shared_ptr< ProperFractionParameterD > > ChannelIntegralParameterD
 
typedef std::vector< ChannelIntegralParameterD > Data
 

Public Member Functions

 FractionalIntegralModel (const FractionalIntegralModel &)=delete
 
FractionalIntegralModeloperator= (const FractionalIntegralModel &)=delete
 
std::shared_ptr< ProperFractionParameterDat (const Channel &channel)
 
std::shared_ptr< const ProperFractionParameterDat (const Channel &channel) const
 
Data::iterator begin () noexcept
 
Data::const_iterator cbegin () const noexcept
 
Data::iterator end () noexcept
 
Data::const_iterator cend () const noexcept
 
std::vector< std::reference_wrapper< const Channel > > get_channels () const override
 Get the set of channels this instance is applicable for.
 
const IntegralModelget_parent_model () const
 
double get_integral (const Channel &channel) const override
 Get the value of the integral in a single Channel.
 
std::vector< std::pair< ParamBaseCRef, ExtraParamFactorValues > > get_integral_derivative_factors (const Channel &channel) const override
 Return the partial derivative of the model w.r.t. each metaparameter.
 
double get_integral_remainder (const Channel &channel) const
 
ProperFractionParameterDget_parameter_frac (const Channel &channel) const
 
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.
 
bool is_final () const
 
size_t size () const
 
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::shared_ptr< FractionalIntegralModelfind_model (const IntegralModel &model)
 
static std::shared_ptr< FractionalIntegralModelmake (std::optional< const Data > data, std::shared_ptr< const IntegralModel > model, bool is_final=false)
 
static const std::shared_ptr< const FractionalIntegralModelmake_const (std::optional< const Data > data, std::shared_ptr< const IntegralModel > model, bool is_final=false)
 

Detailed Description

An IntegralModel that returns a Parameter-dependent fraction of the flux of another IntegralModel.

FractionalIntegralModel instances can be chained but are registered to enforce having at most one dependent FractionalIntegralModel. Chains should end in a single fixed ProperFractionParameter of value 1; this is not yet fully enforced.

Note
For longer chains, a single ProperFractionParameter of value 1 will render all downstream models zero-valued, regardless of their own ProperFractionParameter values. Consider setting Limits to prevent such situations if they become problematic.

Member Function Documentation

◆ find_model()

static std::shared_ptr< FractionalIntegralModel > lsst::gauss2d::fit::FractionalIntegralModel::find_model ( const IntegralModel & model)
inlinestatic

Find the FractionalIntegralModel that depends on a given IntegralModel, if any.

Parameters
modelThe IntegralModel to search for
Returns
The FractionalIntegralModel that depends on model, or nullptr if none

◆ get_channels()

std::vector< std::reference_wrapper< const Channel > > lsst::gauss2d::fit::FractionalIntegralModel::get_channels ( ) const
overridevirtual

Get the set of channels this instance is applicable for.

Note
Implementers must return a set (all unique items). This cannot be enforced (yet).

Implements lsst::gauss2d::fit::Chromatic.

◆ get_integral()

double lsst::gauss2d::fit::FractionalIntegralModel::get_integral ( const Channel & channel) const
overridevirtual

Get the value of the integral in a single Channel.

Implements lsst::gauss2d::fit::IntegralModel.

◆ get_integral_derivative_factors()

std::vector< std::pair< ParamBaseCRef, ExtraParamFactorValues > > lsst::gauss2d::fit::FractionalIntegralModel::get_integral_derivative_factors ( const Channel & channel) const
overridevirtual

Return the partial derivative of the model w.r.t. each metaparameter.

This is generally needed only for nonlinear Parameter instances.

Parameters
channelThe Channel to return derivatives for.
Returns
A vector of Parameter/derivative pairs, with values ordered as specified in GaussianEvaluator (L, sigma_x, sigma_y).

Implements lsst::gauss2d::fit::IntegralModel.

◆ get_parameters()

ParamRefs & lsst::gauss2d::fit::FractionalIntegralModel::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)

Implements lsst::gauss2d::fit::Parametric.

◆ get_parameters_const()

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

Same as get_parameters(), but for const refs.

Implements lsst::gauss2d::fit::Parametric.

◆ make()

std::shared_ptr< FractionalIntegralModel > lsst::gauss2d::fit::FractionalIntegralModel::make ( std::optional< const Data > data,
std::shared_ptr< const IntegralModel > model,
bool is_final = false )
static

Construct a FractionalIntegralModel and add to registry

Parameters
dataThe map of ProperFractionParameter instances for each channel.
modelThe IntegralModel that ProperFractionParameter instances multiply by.
is_finalWhether these fractions are the last in the chain.
Note
Input parameters are validated and will throw exceptions if invalid, e.g. if data and model do not cover the same channels.
Returns
A new FractionalIntegralModel instance

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