File Approximate.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 afw
namespace math

Functions

template<typename PixelT>
std::shared_ptr<Approximate<PixelT>> makeApproximate(std::vector<double> const &x, std::vector<double> const &y, image::MaskedImage<PixelT> const &im, lsst::geom::Box2I const &bbox, ApproximateControl const &ctrl)

Construct a new Approximate object, inferring the type from the type of the given MaskedImage.

Parameters
  • x: the x-values of points

  • y: the y-values of points

  • im: The values at (x, y)

  • bbox: Range where approximation should be valid

  • ctrl: desired approximation algorithm

template<typename PixelT>
class Approximate
#include <Approximate.h>

Approximate values for a MaskedImage

Public Types

typedef float OutPixelT

The pixel type of returned images.

Public Functions

Approximate(Approximate const&)
Approximate(Approximate&&)
Approximate &operator=(Approximate const&)
Approximate &operator=(Approximate&&)
virtual ~Approximate()

dtor

std::shared_ptr<image::Image<OutPixelT>> getImage(int orderX = -1, int orderY = -1) const

Return the approximate image as a Image.

std::shared_ptr<image::MaskedImage<OutPixelT>> getMaskedImage(int orderX = -1, int orderY = -1) const

Return the approximate image as a MaskedImage.

Protected Functions

Approximate(std::vector<double> const &x, std::vector<double> const &y, lsst::geom::Box2I const &bbox, ApproximateControl const &ctrl)

Parameters
  • x: the x-values of points

  • y: the y-values of points

  • bbox: Range where approximation should be valid

  • ctrl: desired approximation algorithm

Base class ctor

Protected Attributes

std::vector<double> const _xVec

the x-values of points

std::vector<double> const _yVec

the y-values of points

lsst::geom::Box2I const _bbox

Domain for approximation.

ApproximateControl const _ctrl

desired approximation algorithm

Private Functions

virtual std::shared_ptr<image::Image<OutPixelT>> doGetImage(int orderX, int orderY) const = 0
virtual std::shared_ptr<image::MaskedImage<OutPixelT>> doGetMaskedImage(int orderX, int orderY) const = 0

Friends

std::shared_ptr<Approximate<PixelT>> makeApproximate(std::vector<double> const &x, std::vector<double> const &y, image::MaskedImage<PixelT> const &im, lsst::geom::Box2I const &bbox, ApproximateControl const &ctrl)

Construct a new Approximate object, inferring the type from the type of the given MaskedImage.

Parameters
  • x: the x-values of points

  • y: the y-values of points

  • im: The values at (x, y)

  • bbox: Range where approximation should be valid

  • ctrl: desired approximation algorithm

class ApproximateControl
#include <Approximate.h>

Control how to make an approximation

Note

the x- and y-order must be the same, due to a limitation of Chebyshev1Function2

Public Types

enum Style

Choose the type of approximation to use.

Values:

UNKNOWN = -1
CHEBYSHEV

Use a 2-D Chebyshev polynomial.

NUM_STYLES

Public Functions

ApproximateControl(Style style, int orderX, int orderY = -1, bool weighting = true)

ctor

Parameters
  • style: Type of approximation

  • orderX: Order of approximation to use in x-direction

  • orderY: Order of approximation to use in y-direction

  • weighting: Use inverse variance weighting?

Style getStyle() const

Return the Style.

void setStyle(Style const style)

Set the Style.

int getOrderX() const

Return the order of approximation to use in the x-direction.

void setOrderX(int const orderX)

Set the order of approximation to use in the x-direction.

int getOrderY() const

Return the order of approximation to use in the y-direction.

void setOrderY(int const orderY)

Set the order of approximation to use in the y-direction.

bool getWeighting() const

Return whether inverse variance weighting will be used in calculation.

void setWeighting(bool const weighting)

Set whether inverse variance weighting will be used in calculation.

Private Members

Style _style
int _orderX
int _orderY
bool _weighting