File RadialProfile.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace shapelet
class RadialProfile
#include <RadialProfile.h>

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:

  • ”gaussian”: a single Gaussian profile

  • ”exp”: Exponential profile (Sersic n=1)

  • ”ser2”: Sersic profile with n=2

  • ”ser3”: Sersic profile with n=3

  • ”dev”: de Vaucouleur profile (Sersic n=4)

  • ”ser5”: Sersic profile with n=5

  • ”lux”: SDSS truncated Exponential profile

  • ”luv”: SDSS truncated and softened de Vaucouleur profile

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

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

ndarray::Array<double, 1, 1> 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.

double getMomentsRadiusFactor() const

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

PTR(MultiShapeletBasis)

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.

Gaussian approximations are computed in advance and persisted, and are usually loaded and registered with the

RadialProfile object in Python at module-import time.
Parameters
  • [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.

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

void lsst::shapelet::RadialProfile::registerBasis(PTR ( MultiShapeletBasis ) basis, int nComponents, int maxRadius)

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

Public Members

int lsst::shapelet::RadialProfile::maxRadius =0) const

Public Static Functions

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

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

Protected Functions

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

Protected Attributes

double _momentsRadiusFactor

Private Types

typedef std::map<std::pair<int, int>, PTR(MultiShapeletBasis)> BasisRegistry

Private Members

std::string const _name
int _defaultMaxRadius
BasisRegistry _basisRegistry