LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
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. More... | |
virtual double | evaluate (double r) const =0 |
Evaluate the profile at the given radius. More... | |
ndarray::Array< double, 1, 1 > | evaluate (ndarray::Array< double const, 1, 1 > const &r) const |
Evaluate the profile at the given radius (vectorized). More... | |
double | getMomentsRadiusFactor () const |
Return the 2nd-moment radius in units of the half-light radius. More... | |
std::shared_ptr< MultiShapeletBasis > | getBasis (int nComponents, int maxRadius=0) const |
Return a multi-Gaussian approximation to the radial profile. More... | |
void | registerBasis (std::shared_ptr< MultiShapeletBasis > basis, int nComponents, int maxRadius) |
Register a basis with the profile, making it available to callers of getBasis(). More... | |
Static Public Member Functions | |
static RadialProfile & | get (std::string const &name) |
Return a predefined radial profile given its name. More... | |
Protected Member Functions | |
RadialProfile (std::string const &name, int defaultMaxRadius) | |
Protected Attributes | |
double | _momentsRadiusFactor |
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.
|
explicitprotected |
|
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.
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.
|
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).
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.
[in] | nComponents | Number of Gaussians used to approximate the profile. |
[in] | maxRadius | Maximum 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.
|
inline |
Return the 2nd-moment radius in units of the half-light radius.
Definition at line 89 of file RadialProfile.h.
|
inline |
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().
|
protected |
Definition at line 118 of file RadialProfile.h.