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
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lsst::gauss2d::GaussianEvaluator< T, Data, Indices > Class Template Reference

A class that evaluates 2D Gaussians and renders them in images. More...

#include <evaluate.h>

Inheritance diagram for lsst::gauss2d::GaussianEvaluator< T, Data, Indices >:
lsst::gauss2d::Object

Public Types

typedef Image< T, Data > DataT
 
typedef ImageArray< T, Data > ImageArrayT
 
typedef Image< idx_type, Indices > IndicesT
 

Public Member Functions

 GaussianEvaluator (int x=0, const std::shared_ptr< const ConvolvedGaussians > gaussians=nullptr)
 
 GaussianEvaluator (const std::shared_ptr< const ConvolvedGaussians > gaussians, const std::shared_ptr< const Image< T, Data > > data=nullptr, const std::shared_ptr< const Image< T, Data > > sigma_inv=nullptr, const std::shared_ptr< Image< T, Data > > output=nullptr, const std::shared_ptr< Image< T, Data > > residual=nullptr, const std::shared_ptr< ImageArrayT > grads=nullptr, const std::shared_ptr< const Image< idx_type, Indices > > grad_param_map=nullptr, const std::shared_ptr< const Image< T, Data > > grad_param_factor=nullptr, const std::shared_ptr< const Image< idx_type, Indices > > extra_param_map=nullptr, const std::shared_ptr< const Image< T, Data > > extra_param_factor=nullptr, const std::shared_ptr< const Image< T, Data > > background=nullptr)
 Construct a GaussianEvaluator, inferring outputs from inputs.
 
 ~GaussianEvaluator () override=default
 
Data const & IMAGE_NULL_CONST () const
 
Indices const & INDICES_NULL_CONST () const
 
ImageArray< T, Data > const & IMAGEARRAY_NULL_CONST () const
 
const CoordinateSystemget_coordsys () const
 
size_t get_n_cols () const
 
size_t get_n_rows () const
 
size_t get_size () const
 
double loglike_pixel (bool to_add=false)
 Compute the model and/or log-likelihood and/or gradient (d(log-likelihood)/dx) and/or Jacobian (dmodel/dx) for a Gaussian mixture model.
 
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.
 

Static Public Member Functions

static std::string_view null_str (const std::string_view &namespace_separator)
 

Static Public Attributes

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 = "."
 

Detailed Description

template<typename T, class Data, class Indices>
class lsst::gauss2d::GaussianEvaluator< T, Data, Indices >

A class that evaluates 2D Gaussians and renders them in images.

This class is designed for repeated re-evaluation of Gaussian mixture models by caching references to the inputs and outputs.

Template Parameters
TThe data type (e.g. float, int)
DataThe data array class
IndicesThe index array class (usually a size_t array)

Definition at line 668 of file evaluate.h.

Member Typedef Documentation

◆ DataT

template<typename T , class Data , class Indices >
typedef Image<T, Data> lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::DataT

Definition at line 670 of file evaluate.h.

◆ ImageArrayT

template<typename T , class Data , class Indices >
typedef ImageArray<T, Data> lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::ImageArrayT

Definition at line 671 of file evaluate.h.

◆ IndicesT

template<typename T , class Data , class Indices >
typedef Image<idx_type, Indices> lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::IndicesT

Definition at line 672 of file evaluate.h.

Constructor & Destructor Documentation

◆ GaussianEvaluator() [1/2]

template<typename T , class Data , class Indices >
lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::GaussianEvaluator ( int x = 0,
const std::shared_ptr< const ConvolvedGaussians > gaussians = nullptr )
inline

Definition at line 674 of file evaluate.h.

674{}

◆ GaussianEvaluator() [2/2]

template<typename T , class Data , class Indices >
lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::GaussianEvaluator ( const std::shared_ptr< const ConvolvedGaussians > gaussians,
const std::shared_ptr< const Image< T, Data > > data = nullptr,
const std::shared_ptr< const Image< T, Data > > sigma_inv = nullptr,
const std::shared_ptr< Image< T, Data > > output = nullptr,
const std::shared_ptr< Image< T, Data > > residual = nullptr,
const std::shared_ptr< ImageArrayT > grads = nullptr,
const std::shared_ptr< const Image< idx_type, Indices > > grad_param_map = nullptr,
const std::shared_ptr< const Image< T, Data > > grad_param_factor = nullptr,
const std::shared_ptr< const Image< idx_type, Indices > > extra_param_map = nullptr,
const std::shared_ptr< const Image< T, Data > > extra_param_factor = nullptr,
const std::shared_ptr< const Image< T, Data > > background = nullptr )
inline

Construct a GaussianEvaluator, inferring outputs from inputs.

Parameters
gaussiansN x 6 matrix of Gaussian parameters [cen_x, cen_y, flux, sigma_x, sigma_y, rho]
coordsysCoordinate system for all images.
data2D input Data matrix.
sigma_inv2D inverse sigma (sqrt variance) map of the same size as data.
output2D output matrix of the same size as ImageD.
residual2D output matrix for residual ((data-model)/sigma) of the same size as data.
gradsOutput for gradients. Can either an M x 1 vector or M x Data 3D Jacobian matrix, where M <= N x 6 to allow for condensing gradients based on grad_param_map.
grad_param_mapNx6 matrix of indices of grad to add each gradient to. For example, if four gaussians share the same cen_x, one could set grad_param_map[0:4,0] = 0. All values must have index < grad.size().
grad_param_factorNx6 matrix of multiplicative factors for each gradient term. For example, if a Gaussian is a sub-component of a multi-Gaussian component with a total flux parameter but fixed ratios, as in multi-Gaussian Sersic models.
extra_param_mapNx2 matrix of indices to add to an extra (meta)parameter. The first item is the index of the Gaussian to add and the second is the index of the metaparameter.
extra_param_factorNx3 matrix of multiplicative factors for each extra gradient term. The factors are ordered L, sigma_x, sigma_y.
backgroundA background model image. Only 1x1 (constant level) backgrounds are supported.

Definition at line 699 of file evaluate.h.

710 : _gaussians(gaussians == nullptr ? GAUSSIANS_NULL : *gaussians),
711 _gaussians_ptr(gaussians == nullptr ? nullptr : gaussians),
712 _n_gaussians(_gaussians.size()),
713 _do_output(output != nullptr),
714 _is_sigma_image((sigma_inv != nullptr) && (sigma_inv->size() > 1)),
715 _do_residual(residual != nullptr),
716 _has_background(background != nullptr),
717 _gradienttype((grads != nullptr && grads->size() > 0)
718 ? (((grads->size() == 1) && ((*grads)[0].get_n_rows() == 1))
721 : GradientType::none),
722 _do_extra(
723 extra_param_map != nullptr && extra_param_factor != nullptr
724 && (_gradienttype == GradientType::loglike || _gradienttype == GradientType::jacobian)),
725 _backgroundtype(background != nullptr ? (_background->size() == 1 ? BackgroundType::constant
728 _get_likelihood((data != nullptr) && (sigma_inv != nullptr)),
729 _data(data),
730 _sigma_inv(sigma_inv),
731 _output(output),
732 _residual(residual),
733 _grads(grads),
734 _grad_param_map((_gradienttype == GradientType::none)
735 ? nullptr
736 : ((grad_param_map != nullptr)
737 ? grad_param_map
738 : detail::_param_map_default<Indices>(_gaussians.size()))),
739 _grad_param_factor(
740 (_gradienttype == GradientType::none)
741 ? nullptr
742 : ((grad_param_factor != nullptr)
743 ? grad_param_factor
744 : detail::_param_factor_default<Data>(_gaussians.size()))),
745 _extra_param_map((_gradienttype == GradientType::none)
746 ? nullptr
747 : ((extra_param_map != nullptr)
748 ? extra_param_map
749 : detail::_param_map_default<Indices>(_gaussians.size(),
750 N_EXTRA_MAP, 0))),
751 _extra_param_factor((_gradienttype == GradientType::none)
752 ? nullptr
753 : ((extra_param_factor != nullptr)
754 ? extra_param_factor
755 : detail::_param_factor_default<Data>(
756 _gaussians.size(), N_EXTRA_FACTOR, 0.))),
757 _grad_extra(_do_extra ? std::make_unique<detail::GradientsExtra<T, Data, Indices>>(
758 *extra_param_map, *extra_param_factor, _grads, _n_gaussians)
759 : nullptr),
760 _grad_param_idx(_grad_param_map == nullptr ? std::vector<size_t>{} : _get_grad_param_idx()),
761 _n_cols(_data == nullptr ? (_output == nullptr ? (_gradienttype == GradientType::jacobian
762 ? (*_grads)[0].get_n_cols()
763 : 0)
764 : _output->get_n_cols())
765 : _data->get_n_cols()),
766 _n_rows(_data == nullptr ? (_output == nullptr ? (_gradienttype == GradientType::jacobian
767 ? (*_grads)[0].get_n_rows()
768 : 0)
769 : _output->get_n_rows())
770 : _data->get_n_rows()),
771 _size(_n_cols * _n_rows),
772 _coordsys(_data == nullptr ? (_output == nullptr ? (_gradienttype == GradientType::jacobian
773 ? (*_grads)[0].get_coordsys()
774 : COORDS_DEFAULT)
775 : _output->get_coordsys())
776 : _data->get_coordsys()) {
777 if (gaussians == nullptr) throw std::runtime_error("Gaussians can't be null");
778 if (_has_background && background->size() > 1)
779 throw std::runtime_error("Background model size can't be > 1");
780 if (!(_n_cols > 0 && _n_rows > 0))
781 throw std::runtime_error("Data can't have n_rows/cols == 0; "
782 + std::to_string(output == nullptr));
783 if (!_do_extra && ((extra_param_map != nullptr) || (extra_param_factor != nullptr))) {
784 throw std::runtime_error(
785 "Must pass all of extra_param_map, extra_param_factor and grads"
786 " to compute extra gradients");
787 }
788 if (_get_likelihood) {
789 // The case of constant variance per pixel
790 if (_is_sigma_image) {
791 if (_n_cols != _sigma_inv->get_n_cols() || _n_rows != _sigma_inv->get_n_rows()) {
792 throw std::runtime_error("Data matrix dimensions [" + std::to_string(_n_cols) + ','
793 + std::to_string(_n_rows)
794 + "] don't match inverse variance dimensions ["
795 + std::to_string(_sigma_inv->get_n_cols()) + ','
796 + std::to_string(_sigma_inv->get_n_rows()) + ']');
797 }
798 if (_sigma_inv->get_coordsys() != _data->get_coordsys()) {
799 throw std::runtime_error("sigma_inv coordsys=" + _sigma_inv->get_coordsys().str()
800 + "!= coordsys=" + get_coordsys().str());
801 }
802 }
803 } else if ((data != nullptr) || (sigma_inv != nullptr)) {
804 throw std::runtime_error("Passed only one non-null data/sigma_inv");
805 }
806 // TODO: Add more coordsys compatibility checks
807 if (_gradienttype != GradientType::none) {
808 const size_t n_gpm = _grad_param_map->get_n_rows();
809 const size_t n_gpf = _grad_param_factor->get_n_rows();
810
811 if ((n_gpm != _n_gaussians) || (n_gpf != _n_gaussians)) {
812 throw std::invalid_argument("nrows for grad_param_map,factor=" + std::to_string(n_gpm) + ","
813 + std::to_string(n_gpf)
814 + " != n_gaussians=" + std::to_string(_n_gaussians));
815 }
816
817 if ((_grad_param_map->get_n_cols() != N_PARAMS_GAUSS2D)
818 || (_grad_param_factor->get_n_cols() != N_PARAMS_GAUSS2D)) {
819 throw std::invalid_argument("n_cols for grad_param_map,factor=" + std::to_string(n_gpm) + ","
820 + std::to_string(n_gpf));
821 }
822
823 const size_t n_grad = (_gradienttype == GradientType::jacobian) ? _grads->size()
824 : (_grads->at(0).get_n_cols());
825 size_t idx_g_max = 0;
826 size_t idx_e_gauss_max = 0;
827 size_t idx_e_param_max = 0;
828 for (size_t g = 0; g < _n_gaussians; ++g) {
829 for (size_t p = 0; p < N_PARAMS_GAUSS2D; ++p) {
830 auto value = _grad_param_map->get_value_unchecked(g, p);
831 if (value > idx_g_max) idx_g_max = value;
832 }
833 auto value = _extra_param_map->get_value_unchecked(g, 0);
834 if (value > idx_e_gauss_max) idx_e_gauss_max = value;
835 value = _extra_param_map->get_value_unchecked(g, 1);
836 if (value > idx_e_param_max) idx_e_param_max = value;
837 }
838 if (!((idx_e_gauss_max < _n_gaussians) && (idx_e_param_max < n_grad))) {
839 throw std::invalid_argument(" max extra_param_map[0]=" + std::to_string(idx_e_gauss_max)
840 + " !< n_gaussians=" + std::to_string(_n_gaussians) + " and/or "
841 + " max extra_param_map[1]=" + std::to_string(idx_e_param_max)
842 + " !< n_grad=" + std::to_string(n_grad));
843 }
844 if (!(idx_g_max < n_grad)) {
845 throw std::invalid_argument("max grad_param_map,extra_param_map[1]="
846 + std::to_string(idx_g_max)
847 + " !< n_grad=" + std::to_string(n_grad));
848 }
849 }
850 if (_gradienttype == GradientType::loglike) {
851 if (!_get_likelihood) {
852 throw std::runtime_error(
853 "Can't compute likelihood gradient without computing likelihood;"
854 " did you pass data and sigma_inv arrays?");
855 }
856 } else if (_gradienttype == GradientType::jacobian) {
857 // This should never happen because the ImageArray constructor requires identical dimensions, but
858 // anyway
859 size_t idx_jac = 0;
860 for (const auto& jac_img : *_grads) {
861 if (!(jac_img->get_n_rows() == _n_rows && jac_img->get_n_cols() == _n_cols)) {
862 throw std::runtime_error("grads[0] matrix dimensions [" + std::to_string(_n_cols) + ','
863 + std::to_string(_n_rows)
864 + "] don't match Jacobian matrix (grads["
865 + std::to_string(idx_jac) + "]) dimensions ["
866 + std::to_string(jac_img->get_n_cols()) + ','
867 + std::to_string(jac_img->get_n_rows()) + ']');
868 }
869 }
870 }
871 }
char * data
Definition BaseRecord.cc:61
std::string str() const override
Return a brief, human-readable string representation of this.
Definition evaluate.h:929
const CoordinateSystem & get_coordsys() const
Definition evaluate.h:878
const std::shared_ptr< const Data > _param_factor_default(size_t n_gaussians, size_t n_params=N_PARAMS_GAUSS2D, double value=1.)
Definition evaluate.h:644
const std::shared_ptr< const Indices > _param_map_default(size_t n_gaussians, size_t n_params=N_PARAMS_GAUSS2D, size_t increment=1)
Definition evaluate.h:629
const size_t N_EXTRA_FACTOR
Definition evaluate.h:60
const size_t N_EXTRA_MAP
Definition evaluate.h:59
const size_t N_PARAMS_GAUSS2D
Definition evaluate.h:61
STL namespace.
decltype(sizeof(void *)) size_t
Definition doctest.h:524
T to_string(T... args)

◆ ~GaussianEvaluator()

template<typename T , class Data , class Indices >
lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::~GaussianEvaluator ( )
overridedefault

Member Function Documentation

◆ get_coordsys()

template<typename T , class Data , class Indices >
const CoordinateSystem & lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::get_coordsys ( ) const
inline

Definition at line 878 of file evaluate.h.

878{ return _coordsys; }

◆ get_n_cols()

template<typename T , class Data , class Indices >
size_t lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::get_n_cols ( ) const
inline

Definition at line 879 of file evaluate.h.

879{ return (_n_cols); }

◆ get_n_rows()

template<typename T , class Data , class Indices >
size_t lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::get_n_rows ( ) const
inline

Definition at line 880 of file evaluate.h.

880{ return (_n_rows); }

◆ get_size()

template<typename T , class Data , class Indices >
size_t lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::get_size ( ) const
inline

Definition at line 881 of file evaluate.h.

881{ return (_size); }

◆ IMAGE_NULL_CONST()

template<typename T , class Data , class Indices >
Data const & lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::IMAGE_NULL_CONST ( ) const
inline

Definition at line 874 of file evaluate.h.

874{ return this->_data_null_const; }

◆ IMAGEARRAY_NULL_CONST()

template<typename T , class Data , class Indices >
ImageArray< T, Data > const & lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::IMAGEARRAY_NULL_CONST ( ) const
inline

Definition at line 876 of file evaluate.h.

876{ return this->_data_array_null_const; }

◆ INDICES_NULL_CONST()

template<typename T , class Data , class Indices >
Indices const & lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::INDICES_NULL_CONST ( ) const
inline

Definition at line 875 of file evaluate.h.

875{ return this->_indices_null_const; }

◆ loglike_pixel()

template<typename T , class Data , class Indices >
double lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::loglike_pixel ( bool to_add = false)
inline

Compute the model and/or log-likelihood and/or gradient (d(log-likelihood)/dx) and/or Jacobian (dmodel/dx) for a Gaussian mixture model.

This function calls a series of templated functions with explicit instantiations. This is solely for the purpose of avoiding having to manually write a series of nested conditionals. My hope is that the templating will insert no-op functions wherever there's nothing to do instead of a needless branch inside each pixel's loop, and that the compiler will actually inline everything for maximum performance. Whether that actually happens or not is anyone's guess.

TODO: Consider override to compute LL and Jacobian, even if it's only useful for debug purposes.

Returns
The log likelihood.

Definition at line 897 of file evaluate.h.

897 {
898 const OutputType output_type
899 = this->_do_output ? (to_add ? OutputType::add : OutputType::overwrite) : OutputType::none;
900 return output_type == OutputType::overwrite
901 ? loglike_gaussians_pixel_output<OutputType::overwrite>()
902 : (output_type == OutputType::add
903 ? loglike_gaussians_pixel_output<OutputType::add>()
904 : loglike_gaussians_pixel_output<OutputType::none>());
905 }

◆ 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()

template<typename T , class Data , class Indices >
std::string lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::repr ( bool name_keywords = false,
std::string_view namespace_separator = Object::CC_NAMESPACE_SEPARATOR ) const
inlineoverridevirtual

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.

Implements lsst::gauss2d::Object.

Definition at line 907 of file evaluate.h.

908 {
909 std::string null = namespace_separator == Object::CC_NAMESPACE_SEPARATOR ? "nullptr" : "None";
910 // These are sadly just to keep formatting aligned nicely
911 auto is_kw = name_keywords;
912 auto name_sep = namespace_separator;
913 std::string c = ", ";
914 std::string rval = ( // I really want this on a separate line; I'd also prefer single indent, but...
915 type_name_str<GaussianEvaluator>(false, name_sep) + "(" // make clang-format align nicely
916 + (is_kw ? "gaussians=" : "") + repr_ptr(_gaussians_ptr, is_kw, name_sep) + ", " //
917 + (is_kw ? "data=" : "") + repr_ptr(_data, is_kw, name_sep) + ", " //
918 + (is_kw ? "sigma_inv=" : "") + repr_ptr(_sigma_inv, is_kw, name_sep) + ", " //
919 + (is_kw ? "output=" : "") + repr_ptr(_output, is_kw, name_sep) + ", " //
920 + (is_kw ? "residual=" : "") + repr_ptr(_residual, is_kw, name_sep) + ", " //
921 + (is_kw ? "grads=" : "") + repr_ptr(_grads, is_kw, name_sep) + ", " //
922 + (is_kw ? "grad_param_map=" : "") + repr_ptr(_grad_param_map, is_kw, name_sep) + ", "
923 + (is_kw ? "grad_param_factor=" : "") + repr_ptr(_grad_param_factor, is_kw, name_sep) + c
924 + (is_kw ? "extra_param_map=" : "") + repr_ptr(_extra_param_map, is_kw, name_sep) + ", "
925 + (is_kw ? "extra_param_factor=" : "") + repr_ptr(_extra_param_factor, is_kw, name_sep) + c
926 + (is_kw ? "background=" : "") + repr_ptr(_background, is_kw, name_sep) + ")");
927 return rval;
928 }
std::string repr_ptr(T ptr, bool name_keywords, std::string_view namespace_separator)
Definition object.h:82

◆ str()

template<typename T , class Data , class Indices >
std::string lsst::gauss2d::GaussianEvaluator< T, Data, Indices >::str ( ) const
inlineoverridevirtual

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

Implements lsst::gauss2d::Object.

Definition at line 929 of file evaluate.h.

929 {
930 std::string c = ", ";
931 // The comments force clang-format to keep to a more readable one var per line
932 std::string rval = ( //
933 type_name_str<GaussianEvaluator>(true) + "(" //
934 + "gaussians=" + str_ptr(_gaussians_ptr) + c //
935 + "do_extra=" + std::to_string(_do_extra) + c //
936 + "do_output=" + std::to_string(_do_output) + c //
937 + "do_residual=" + std::to_string(_do_residual) + c //
938 + "has_background=" + std::to_string(_has_background) + c //
939 + "is_sigma_image=" + std::to_string(_is_sigma_image) + c //
940 + "backgroundtype=" + std::to_string(static_cast<int>(_backgroundtype)) + c //
941 + "get_likelihood=" + std::to_string(_get_likelihood) + c //
942 + "data=" + str_ptr(_data) + c //
943 + "sigma_inv=" + str_ptr(_sigma_inv) + c //
944 + "output=" + str_ptr(_output) + c //
945 + "residual=" + str_ptr(_residual) + c //
946 + "grads=" + str_ptr(_grads) + c //
947 + "grad_param_map=" + str_ptr(_grad_param_map) + c //
948 + "grad_param_factor=" + str_ptr(_grad_param_factor) + c //
949 + "extra_param_map=" + str_ptr(_extra_param_map) + c //
950 + "extra_param_factor=" + str_ptr(_extra_param_factor) + c //
951 + "grad_extra=" + str_ptr(_grad_extra ? _grad_extra.get() : nullptr) + c //
952 + "grad_param_idx=" + to_string_iter(_grad_param_idx) + c //
953 + "n_cols=" + std::to_string(_n_cols) + c //
954 + "n_rows=" + std::to_string(_n_rows) + c //
955 + "coordsys=" + _coordsys.str() //
956 + ")" //
957 );
958 return rval;
959 }
std::string str_ptr(T ptr)
Definition object.h:132
std::string to_string_iter(const Container< Value > &container)
Definition to_string.h:38

Member Data Documentation

◆ 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.

◆ 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 file: