LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
lsst::gauss2d::fit::SersicMixComponent Class Reference

A Gaussian mixture approximation to a Sersic profile Component. More...

#include <sersicmixcomponent.h>

Inheritance diagram for lsst::gauss2d::fit::SersicMixComponent:
lsst::gauss2d::fit::SersicParametricEllipseHolder lsst::gauss2d::fit::EllipticalComponent lsst::gauss2d::fit::Component lsst::gauss2d::fit::ParametricModel lsst::gauss2d::fit::Parametric lsst::gauss2d::Object

Classes

class  SersicMixGaussianComponent
 

Public Member Functions

 SersicMixComponent (std::shared_ptr< SersicParametricEllipse > ellipse=nullptr, std::shared_ptr< CentroidParameters > centroid=nullptr, std::shared_ptr< IntegralModel > integralmodel=nullptr, std::shared_ptr< SersicMixComponentIndexParameterD > sersicindex=nullptr)
 
 ~SersicMixComponent ()
 
void add_extra_param_map (const Channel &channel, ExtraParamMap &map_extra, const GradParamMap &map_grad, ParameterMap &offsets) const override
 Add extra Parameter indices to a map.
 
void add_extra_param_factors (const Channel &channel, ExtraParamFactors &factors) const override
 Add extra Parameter gradient factors to an existing vector.
 
void add_grad_param_map (const Channel &channel, GradParamMap &map, ParameterMap &offsets) const override
 Add Parameter gradient indices to an existing map.
 
void add_grad_param_factors (const Channel &channel, GradParamFactors &factor) const override
 Add Parameter gradient factors to an existing map.
 
std::unique_ptr< const lsst::gauss2d::Gaussiansget_gaussians (const Channel &channel) const override
 Return the vector of Gaussian sub-components controlled by this model.
 
size_t get_n_gaussians (const Channel &channel) const override
 Return the number of Gaussian sub-components controlled by this model.
 
ParamRefsget_parameters (ParamRefs &params, ParamFilter *filter=nullptr) const override
 Add Parameter refs matching the filter to a vector, in order.
 
ParamCRefsget_parameters_const (ParamCRefs &params, ParamFilter *filter=nullptr) const override
 Same as get_parameters(), but for const refs.
 
double get_sersicindex () const
 
SersicMixComponentIndexParameterDget_sersicindex_param () const
 
std::shared_ptr< SersicMixComponentIndexParameterDget_sersicindex_param_ptr ()
 
void set_extra_param_factors (const Channel &channel, ExtraParamFactors &factors, size_t index) const override
 Set extra Parameter gradient factors in an existing map.
 
void set_grad_param_factors (const Channel &channel, GradParamFactors &factors, size_t index) const override
 Set Parameter gradient factors in an existing map.
 
void set_sersicindex (double value)
 
std::string repr (bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
 Return a full, callable string representation of this.
 
std::string str () const override
 Return a brief, human-readable string representation of this.
 
const CentroidParametersget_centroid () const
 Get the centroid Parameter container.
 
const ParametricEllipseget_ellipse () const
 Get the ellipse Parameter container.
 
const IntegralModelget_integralmodel () const override
 
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::string_view null_str (const std::string_view &namespace_separator)
 

Static Public Attributes

static const size_t N_PARAMS = N_PARAMS_GAUSS2D + 1
 
static constexpr std::string_view CC_NAMESPACE_SEPARATOR = "::"
 The C++ namespace separator.
 
static constexpr std::string_view NULL_STR_GENERAL = "None"
 
static constexpr std::string_view PY_NAMESPACE_SEPARATOR = "."
 

Protected Attributes

std::shared_ptr< ParametricEllipse_ellipse
 
std::shared_ptr< CentroidParameters_centroid
 
std::shared_ptr< IntegralModel_integralmodel
 

Detailed Description

A Gaussian mixture approximation to a Sersic profile Component.

This Component approximates the Sersic (1968) profile, which is a widely-used (in astronomy) exponentially-declining radial profile with a single shape parameter. It is also functionally a generalization of the Gaussian (Sersic index n=0.5), exponential (n=1) and de Vaucouleurs (1948) (n=4) profiles.

This particular implementation closely matches the majority of the profile, but deliberately excludes the very inner and outermost regions.

Note
See Graham & Driver 2005 for a useful summary of various properties of the Sersic profile.

Definition at line 85 of file sersicmixcomponent.h.

Constructor & Destructor Documentation

◆ SersicMixComponent()

lsst::gauss2d::fit::SersicMixComponent::SersicMixComponent ( std::shared_ptr< SersicParametricEllipse > ellipse = nullptr,
std::shared_ptr< CentroidParameters > centroid = nullptr,
std::shared_ptr< IntegralModel > integralmodel = nullptr,
std::shared_ptr< SersicMixComponentIndexParameterD > sersicindex = nullptr )
explicit

Definition at line 270 of file sersicmixcomponent.cc.

275 EllipticalComponent(_ellipsedata, centroid, integralmodel),
276 _sersicindex(sersicindex != nullptr ? std::move(sersicindex)
277 : std::make_shared<SersicMixComponentIndexParameterD>()) {
278 for (const Channel& channel : _integralmodel->get_channels()) {
279 auto& gaussians = _gaussians[channel];
280 gaussians.reserve(_sersicindex->get_order());
281 for (size_t index = 0; index < _sersicindex->get_order(); ++index) {
282 auto ell = std::make_shared<SersicEllipseData>(
283 _ellipsedata->get_reff_x_param_ptr(), _ellipsedata->get_reff_y_param_ptr(),
284 _ellipsedata->get_rho_param_ptr(), _sersicindex, index);
285 auto integral
286 = std::make_shared<SersicModelIntegral>(channel, _integralmodel, _sersicindex, index);
287 gaussians.emplace_back(
288 std::make_unique<SersicMixGaussianComponent>(ell, this->_centroid, integral));
289 }
290 };
291}
std::shared_ptr< CentroidParameters > _centroid
std::shared_ptr< IntegralModel > _integralmodel
EllipticalComponent(std::shared_ptr< ParametricEllipse > ellipse, std::shared_ptr< CentroidParameters > centroid=nullptr, std::shared_ptr< IntegralModel > integralmodel=nullptr)
Construct an EllipticalComponent from Parameter containers.
SersicParametricEllipseHolder(std::shared_ptr< SersicParametricEllipse > ellipse=nullptr)
This constructor does not need to be called by users.
std::shared_ptr< SersicParametricEllipse > _ellipsedata
T make_shared(T... args)
T move(T... args)
STL namespace.

◆ ~SersicMixComponent()

lsst::gauss2d::fit::SersicMixComponent::~SersicMixComponent ( )

Definition at line 293 of file sersicmixcomponent.cc.

293{};

Member Function Documentation

◆ add_extra_param_factors()

void lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 320 of file sersicmixcomponent.cc.

320 {
321 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
322 factors.push_back({0, 0, 0});
323 }
324}

◆ add_extra_param_map()

void lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 295 of file sersicmixcomponent.cc.

296 {
297 if (_sersicindex->get_free()) {
298 auto found = offsets.find(*_sersicindex);
299 if (found == offsets.end()) {
300 throw std::runtime_error("_sersicindex=" + _sersicindex->str()
301 + " not found in offsets; was add_grad_param_map called?");
302 }
303 const auto& offset = (*found).second;
304 const size_t order = _sersicindex->get_order();
305 const size_t size_map_grad = map_grad.size();
306 if (!(size_map_grad >= order)) {
307 throw std::invalid_argument("map_grad.size()=" + std::to_string(map_grad.size())
308 + "!>=order=" + std::to_string(order));
309 }
310 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
311 map_extra.push_back({size_map_grad - order + idx_g, offset});
312 }
313 } else {
314 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
315 map_extra.push_back({0, 0});
316 }
317 }
318}
T to_string(T... args)
table::Key< int > order

◆ add_grad_param_factors()

void lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 364 of file sersicmixcomponent.cc.

364 {
365 ParamCRefs params;
366 ParamFilter filter{};
367 filter.channel = channel;
368 this->get_parameters_const(params, &filter);
369
370 if (params.size() != N_PARAMS) {
371 throw std::runtime_error(this->str() + "get_parameters_const with channel=" + channel.str() + " size="
372 + std::to_string(params.size()) + "!=N_PARAMS=" + std::to_string(N_PARAMS));
373 }
374
375 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
376 std::array<double, N_PARAMS_GAUSS2D> values{1., 1., 1., 1., 1., 1.};
377 factors.push_back(values);
378 }
379}
std::string str() const override
Return a brief, human-readable string representation of this.
ParamCRefs & get_parameters_const(ParamCRefs &params, ParamFilter *filter=nullptr) const override
Same as get_parameters(), but for const refs.
std::vector< ParamBaseCRef > ParamCRefs
Definition param_defs.h:11

◆ add_grad_param_map()

void lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 326 of file sersicmixcomponent.cc.

327 {
328 ParamCRefs params;
329 ParamFilter filter{};
330 filter.channel = channel;
331 this->get_parameters_const(params, &filter);
332
333 if (params.size() != N_PARAMS) {
334 throw std::runtime_error(this->str() + "get_parameters_const with channel=" + channel.str() + " size="
335 + std::to_string(params.size()) + "!=N_PARAMS=" + std::to_string(N_PARAMS));
336 }
337
338 std::array<size_t, N_PARAMS_GAUSS2D> values{0, 0, 0, 0, 0, 0};
339
340 size_t size_map = offsets.size();
341 size_t index_param_map;
342 for (size_t idx_param = 0; idx_param < N_PARAMS_GAUSS2D; ++idx_param) {
343 const size_t& order_param = IDX_ORDER[idx_param];
344 // The parameters must be in the same order as returned by get_parameters(_const)
345 const auto& param = params.at(idx_param).get();
346 if (!param.get_fixed()) {
347 if (offsets.find(param) == offsets.end()) {
348 index_param_map = ++size_map;
349 offsets[param] = index_param_map;
350 } else {
351 index_param_map = offsets[param];
352 }
353 values[order_param] = index_param_map;
354 }
355 }
356 if (_sersicindex->get_free() && (offsets.find(*_sersicindex) == offsets.end())) {
357 offsets[params[N_PARAMS_GAUSS2D]] = offsets.size() + 1;
358 }
359 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
360 map.push_back(values);
361 }
362}
const size_t N_PARAMS_GAUSS2D
Definition evaluate.h:61

◆ get_centroid()

const CentroidParameters & lsst::gauss2d::fit::EllipticalComponent::get_centroid ( ) const
inherited

Get the centroid Parameter container.

Definition at line 23 of file ellipticalcomponent.cc.

23{ return *_centroid; }

◆ get_ellipse()

const ParametricEllipse & lsst::gauss2d::fit::EllipticalComponent::get_ellipse ( ) const
inherited

Get the ellipse Parameter container.

Definition at line 24 of file ellipticalcomponent.cc.

24{ return *_ellipse; }
std::shared_ptr< ParametricEllipse > _ellipse

◆ get_gaussians()

std::unique_ptr< const lsst::gauss2d::Gaussians > lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 381 of file sersicmixcomponent.cc.

382 {
384 // TODO: This isn't sufficient; need to implement get_n_components
385 const auto& components = _gaussians.at(channel);
386 in.reserve(components.size());
387 for (auto& component : components) {
388 in.push_back(component->get_gaussians(channel)->get_data());
389 }
390 return std::make_unique<lsst::gauss2d::Gaussians>(in);
391}
table::Key< table::Array< int > > components

◆ get_integralmodel()

const IntegralModel & lsst::gauss2d::fit::EllipticalComponent::get_integralmodel ( ) const
overridevirtualinherited

Implements lsst::gauss2d::fit::Component.

Definition at line 25 of file ellipticalcomponent.cc.

25{ return *_integralmodel; }

◆ get_n_gaussians()

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

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

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

Definition at line 393 of file sersicmixcomponent.cc.

393 {
394 return _gaussians.at(channel).size();
395};

◆ get_parameters()

ParamRefs & lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 397 of file sersicmixcomponent.cc.

397 {
399 insert_param(*_sersicindex, params, filter);
400 return params;
401}
ParamRefs & get_parameters(ParamRefs &params, ParamFilter *filter=nullptr) const override
Add Parameter refs matching the filter to a vector, in order.
void insert_param(g2f::ParamBase &param, t &params, ParamFilter *filter=nullptr)
Add a Parameter to a vector thereof, if it meets conditions.

◆ get_parameters_const()

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

Same as get_parameters(), but for const refs.

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

Definition at line 403 of file sersicmixcomponent.cc.

403 {
405 insert_param(*_sersicindex, params, filter);
406 return params;
407}
ParamCRefs & get_parameters_const(ParamCRefs &params, ParamFilter *filter=nullptr) const override
Same as get_parameters(), but for const refs.

◆ get_parameters_const_new()

ParamCRefs lsst::gauss2d::fit::Parametric::get_parameters_const_new ( ParamFilter * filter = nullptr) const
inlineinherited

Same as get_parameters_const(), but returning a new vector.

Definition at line 33 of file parametric.h.

33 {
34 ParamCRefs params{};
35 get_parameters_const(params, filter);
36 return params;
37 }
virtual ParamCRefs & get_parameters_const(ParamCRefs &params, ParamFilter *filter=nullptr) const =0
Same as get_parameters(), but for const refs.

◆ get_parameters_new()

ParamRefs lsst::gauss2d::fit::Parametric::get_parameters_new ( ParamFilter * filter = nullptr) const
inlineinherited

Same as get_parameters(), but returning a new vector.

Definition at line 27 of file parametric.h.

27 {
28 ParamRefs params{};
29 get_parameters(params, filter);
30 return params;
31 }
virtual ParamRefs & get_parameters(ParamRefs &params, ParamFilter *filter=nullptr) const =0
Add Parameter refs matching the filter to a vector, in order.
std::vector< ParamBaseRef > ParamRefs
Definition param_defs.h:13

◆ get_sersicindex()

double lsst::gauss2d::fit::SersicMixComponent::get_sersicindex ( ) const

Definition at line 409 of file sersicmixcomponent.cc.

409{ return this->_sersicindex->get_value(); }

◆ get_sersicindex_param()

SersicMixComponentIndexParameterD & lsst::gauss2d::fit::SersicMixComponent::get_sersicindex_param ( ) const

Definition at line 411 of file sersicmixcomponent.cc.

411 {
412 return *(this->_sersicindex);
413}

◆ get_sersicindex_param_ptr()

std::shared_ptr< SersicMixComponentIndexParameterD > lsst::gauss2d::fit::SersicMixComponent::get_sersicindex_param_ptr ( )

Definition at line 415 of file sersicmixcomponent.cc.

415 {
416 return this->_sersicindex;
417}

◆ null_str()

static std::string_view lsst::gauss2d::Object::null_str ( const std::string_view & namespace_separator)
inlinestaticinherited

Definition at line 49 of file object.h.

49 {
50 return namespace_separator == CC_NAMESPACE_SEPARATOR ? "nullptr" : NULL_STR_GENERAL;
51 }
static constexpr std::string_view CC_NAMESPACE_SEPARATOR
The C++ namespace separator.
Definition object.h:45
static constexpr std::string_view NULL_STR_GENERAL
Definition object.h:46

◆ repr()

std::string lsst::gauss2d::fit::SersicMixComponent::repr ( bool name_keywords = false,
std::string_view namespace_separator = Object::CC_NAMESPACE_SEPARATOR ) const
overridevirtual

Return a full, callable string representation of this.

Parameters
name_keywordsWhether to prefix arguments with "{name}=", where name is the arg name in the header (as with keyword arguments in Python).
namespace_separatorThe string to use to delimit namespaces, i.e. :: in C++ and . in Python.
Returns
A callable string representation of this, which should return an an identical object to this.
Note
The representation with name_keywords=false must be callable in C++. The representation with name_keywords=true should be callable in Python, if there are any bindings.

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

Definition at line 484 of file sersicmixcomponent.cc.

484 {
485 return type_name_str<SersicMixComponent>(false, namespace_separator) + "("
486 + EllipticalComponent::repr(name_keywords, namespace_separator) + ", "
487 + (name_keywords ? "sersicindex=" : "") + _sersicindex->repr(name_keywords, namespace_separator)
488 + ")";
489}
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.

◆ set_extra_param_factors()

void lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 419 of file sersicmixcomponent.cc.

420 {
421 if (_sersicindex->get_free()) {
422 const auto& integralmodel = this->get_integralmodel();
423 double dx = 1. / _sersicindex->get_transform_derivative();
424 const double dintegral = dx * integralmodel.get_integral(channel);
425 const double dreff_x = dx * _ellipse->get_size_x_param().get_size();
426 const double dreff_y = dx * _ellipse->get_size_y_param().get_size();
427 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
428 const double dsizeratio = _sersicindex->get_sizeratio_deriv(idx_g);
429 auto& values = factors.at(index + idx_g);
430 values[0] = dintegral * _sersicindex->get_integralratio_deriv(idx_g);
431 values[1] = dreff_x * dsizeratio;
432 values[2] = dreff_y * dsizeratio;
433 }
434 } else {
435 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
436 auto& values = factors[index + idx_g];
437 values[0] = 0;
438 values[1] = 0;
439 values[2] = 0;
440 }
441 }
442}
const IntegralModel & get_integralmodel() const override

◆ set_grad_param_factors()

void lsst::gauss2d::fit::SersicMixComponent::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.

Definition at line 444 of file sersicmixcomponent.cc.

445 {
446 ParamCRefs params;
447 ParamFilter filter{};
448 filter.channel = channel;
449 this->get_parameters_const(params, &filter);
450
451 std::array<double, N_PARAMS_GAUSS2D> values_base{1., 1., 1., 1., 1., 1.};
452
453 for (size_t idx_param = 0; idx_param < N_PARAMS_GAUSS2D; ++idx_param) {
454 const size_t& order_param = IDX_ORDER[idx_param];
455 // The parameters must be in the same order as returned by get_parameters(_const)
456 const auto& param = params.at(idx_param).get();
457 if (param.get_fixed()) {
458 values_base[order_param] = 0;
459 } else {
460 const auto deriv = param.get_transform_derivative();
461 if (deriv == 0)
462 throw std::runtime_error("Param[idx=" + std::to_string(idx_param) + "]=" + param.str()
463 + " get_transform_derivative=0 (will result in divide by 0)");
464 values_base[order_param] /= deriv;
465 }
466 }
467
468 const auto& subcomps = _gaussians.at(channel);
469 for (size_t idx_g = 0; idx_g < _sersicindex->get_order(); ++idx_g) {
470 const auto& subcomp = subcomps[idx_g];
471 auto& values = factors[index + idx_g];
472 values[0] = values_base[0];
473 values[1] = values_base[1];
474 values[2] = values_base[2] * subcomp->get_integralmodel().get_integralratio();
475 const double sizeratio = subcomp->get_ellipse().get_sizeratio();
476 values[3] = values_base[3] * sizeratio;
477 values[4] = values_base[4] * sizeratio;
478 values[5] = values_base[5];
479 }
480}

◆ set_sersicindex()

void lsst::gauss2d::fit::SersicMixComponent::set_sersicindex ( double value)

Definition at line 482 of file sersicmixcomponent.cc.

482{ this->_sersicindex->set_value(value); }

◆ str()

std::string lsst::gauss2d::fit::SersicMixComponent::str ( ) const
overridevirtual

Return a brief, human-readable string representation of this.

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

Definition at line 491 of file sersicmixcomponent.cc.

491 {
492 return type_name_str<SersicMixComponent>(true) + "(" + EllipticalComponent::str()
493 + ", sersicindex=" + _sersicindex->str() + ")";
494}
std::string str() const override
Return a brief, human-readable string representation of this.

Member Data Documentation

◆ _centroid

std::shared_ptr<CentroidParameters> lsst::gauss2d::fit::EllipticalComponent::_centroid
protectedinherited

Definition at line 42 of file ellipticalcomponent.h.

◆ _ellipse

std::shared_ptr<ParametricEllipse> lsst::gauss2d::fit::EllipticalComponent::_ellipse
protectedinherited

Definition at line 41 of file ellipticalcomponent.h.

◆ _integralmodel

std::shared_ptr<IntegralModel> lsst::gauss2d::fit::EllipticalComponent::_integralmodel
protectedinherited

Definition at line 43 of file ellipticalcomponent.h.

◆ CC_NAMESPACE_SEPARATOR

constexpr std::string_view lsst::gauss2d::Object::CC_NAMESPACE_SEPARATOR = "::"
staticconstexprinherited

The C++ namespace separator.

Definition at line 45 of file object.h.

◆ N_PARAMS

const size_t lsst::gauss2d::fit::SersicMixComponent::N_PARAMS = N_PARAMS_GAUSS2D + 1
static

Definition at line 110 of file sersicmixcomponent.h.

◆ NULL_STR_GENERAL

constexpr std::string_view lsst::gauss2d::Object::NULL_STR_GENERAL = "None"
staticconstexprinherited

Definition at line 46 of file object.h.

◆ PY_NAMESPACE_SEPARATOR

constexpr std::string_view lsst::gauss2d::Object::PY_NAMESPACE_SEPARATOR = "."
staticconstexprinherited

Definition at line 47 of file object.h.


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