LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lsst::shapelet::RadialProfile Class Referenceabstract

Registry and utility class for multi-Gaussian approximations to radial profiles. More...

#include <RadialProfile.h>

Public Member Functions

std::string const getName () const
 Return the name of the profile.
 
virtual double evaluate (double r) const =0
 Evaluate the profile at the given radius.
 
ndarray::Array< double, 1, 1 > evaluate (ndarray::Array< double const, 1, 1 > const &r) const
 Evaluate the profile at the given radius (vectorized).
 
double getMomentsRadiusFactor () const
 Return the 2nd-moment radius in units of the half-light radius.
 
std::shared_ptr< MultiShapeletBasisgetBasis (int nComponents, int maxRadius=0) const
 Return a multi-Gaussian approximation to the radial profile.
 
void registerBasis (std::shared_ptr< MultiShapeletBasis > basis, int nComponents, int maxRadius)
 Register a basis with the profile, making it available to callers of getBasis().
 

Static Public Member Functions

static RadialProfileget (std::string const &name)
 Return a predefined radial profile given its name.
 

Protected Member Functions

 RadialProfile (std::string const &name, int defaultMaxRadius)
 

Protected Attributes

double _momentsRadiusFactor
 

Detailed Description

Registry and utility class for multi-Gaussian approximations to radial profiles.

RadialProfile provides C++ access to the saved multi-Gaussian approximations stored in the pickle files in the data subdirectory of the shapelet package, by maintaining a singleton registry of these that is populated at import time by tractor.py. It also provides access to the true (exact) profiles, (mostly useful for educational/diagnostic purposes) and information about the relationship between different radii for this profile (see getMomentsRadiusFactor()).

Each RadialProfile object represents a particular "true" profile, and can hold multiple multi-Gaussian (or multi-Shapelet) approximations with different degrees of fidelity, as controlled by the number of components in the approximation and the maximum radius at which the approximation was fit. For more information about these approximations, see tractor.py and references therein. All RadialProfiles are defined in units of the half-light radius of the true profile, even for profiles for which this is not the radius typically used.

Several predefined subclasses of RadialProfile are defined privately, and can be accessed by name through the static get() method:

Definition at line 60 of file RadialProfile.h.

Constructor & Destructor Documentation

◆ RadialProfile()

lsst::shapelet::RadialProfile::RadialProfile ( std::string const & name,
int defaultMaxRadius )
explicitprotected

Member Function Documentation

◆ evaluate() [1/2]

virtual double lsst::shapelet::RadialProfile::evaluate ( double r) const
pure virtual

Evaluate the profile at the given radius.

Radius is given in units of half-light radius, and the profile is normalized to 1 at r=1.

◆ evaluate() [2/2]

ndarray::Array< double, 1, 1 > lsst::shapelet::RadialProfile::evaluate ( ndarray::Array< double const, 1, 1 > const & r) const

Evaluate the profile at the given radius (vectorized).

Radius is given in units of half-light radius, and the profile is normalized to 1 at r=1.

◆ get()

static RadialProfile & lsst::shapelet::RadialProfile::get ( std::string const & name)
static

Return a predefined radial profile given its name.

New RadialProfile classes are registered when their constructor is invoked, so all subclasses should only be instantiated once (at module scope).

◆ getBasis()

std::shared_ptr< MultiShapeletBasis > lsst::shapelet::RadialProfile::getBasis ( int nComponents,
int maxRadius = 0 ) const

Return a multi-Gaussian approximation to the radial profile.

Unlike the evaluate() method, the returned basis is normalized that the integrated flux is equal to the (single) amplitude.

Parameters
[in]nComponentsNumber of Gaussians used to approximate the profile.
[in]maxRadiusMaximum radius used in fitting the approximation. Passing 0 selects the default for that profile.

Gaussian approximations are computed in advance and persisted, and are usually loaded and registered with the RadialProfile object in Python at module-import time.

Throws NotFoundError if the a basis with the given combination of nComponents and maxRadius has not been added to the RadialProfile.

◆ getMomentsRadiusFactor()

double lsst::shapelet::RadialProfile::getMomentsRadiusFactor ( ) const
inline

Return the 2nd-moment radius in units of the half-light radius.

Definition at line 89 of file RadialProfile.h.

◆ getName()

std::string const lsst::shapelet::RadialProfile::getName ( ) const
inline

Return the name of the profile.

Definition at line 72 of file RadialProfile.h.

72{ return _name; }

◆ registerBasis()

void lsst::shapelet::RadialProfile::registerBasis ( std::shared_ptr< MultiShapeletBasis > basis,
int nComponents,
int maxRadius )

Register a basis with the profile, making it available to callers of getBasis().

Member Data Documentation

◆ _momentsRadiusFactor

double lsst::shapelet::RadialProfile::_momentsRadiusFactor
protected

Definition at line 118 of file RadialProfile.h.


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