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