LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Namespaces | Classes | Enumerations | Functions
lsst::meas::base Namespace Reference

Namespaces

 apCorrRegistry
 
 applyApCorr
 
 baseMeasurement
 
 forcedMeasurement
 
 forcedPhotCcd
 
 forcedPhotCoadd
 
 forcedPhotImage
 
 measureApCorr
 
 noiseReplacer
 
 pluginRegistry
 
 plugins
 
 references
 
 sfm
 
 tests
 
 transforms
 
 version
 
 wrappers
 

Classes

class  BaseAlgorithm
 
class  SingleFrameAlgorithm
 
class  ForcedAlgorithm
 
class  SimpleAlgorithm
 
class  ApertureFluxControl
 
class  ApertureFluxAlgorithm
 
struct  ApertureFluxResult
 
class  ApertureFluxTransform
 
struct  CentroidResult
 A reusable struct for centroid measurements. More...
 
class  CentroidResultKey
 A FunctorKey for CentroidResult. More...
 
class  CentroidTransform
 
class  CircularApertureFluxAlgorithm
 
class  MeasurementError
 Exception to be thrown when a measurement algorithm experiences a known failure mode. More...
 
struct  FlagDefinition
 Simple POD struct used to define and document flags. More...
 
class  FlagHandler
 
struct  FluxResult
 A reusable result struct for flux measurements. More...
 
class  FluxResultKey
 A FunctorKey for FluxResult. More...
 
struct  MagResult
 A reusable result struct for magnitudes. More...
 
class  MagResultKey
 A FunctorKey for MagResult. More...
 
class  FluxTransform
 
class  NoThrowOnNegativeFluxContext
 
struct  FittedModel
 
class  GaussianCentroidControl
 A C++ control class to handle GaussianCentroidAlgorithm's configuration. More...
 
class  GaussianCentroidAlgorithm
 A class that calculates a centroid by fitting a circular Gaussian to the image. More...
 
class  GaussianCentroidTransform
 
class  GaussianFluxControl
 A C++ control class to handle GaussianFluxAlgorithm's configuration. More...
 
class  GaussianFluxAlgorithm
 A measurement algorithm that estimates flux using an elliptical Gaussian weight. More...
 
class  GaussianFluxTransform
 
class  SafeCentroidExtractor
 
class  SafeShapeExtractor
 
class  NaiveCentroidControl
 A C++ control class to handle NaiveCentroidAlgorithm's configuration. More...
 
class  NaiveCentroidAlgorithm
 A class that calculates a centroid as a simple unweighted first moment of the 3x3 region around a pixel. More...
 
class  NaiveCentroidTransform
 
class  PeakLikelihoodFluxControl
 C++ control object for peak likelihood flux. More...
 
class  PeakLikelihoodFluxAlgorithm
 A measurement algorithm that estimates the peak flux, using a filtered image which has been convolved with its own PSF. More...
 
class  PeakLikelihoodFluxTransform
 
class  PixelFlagsControl
 A C++ control class to handle PixelFlagsAlgorithm's configuration. More...
 
class  PixelFlagsAlgorithm
 A measurement algorithm that gets mask bits from the exposure and sets flag bits to summarize which bits are set within a source's footprint. More...
 
class  PsfFluxControl
 A C++ control class to handle PsfFluxAlgorithm's configuration. More...
 
class  PsfFluxAlgorithm
 A measurement algorithm that estimates flux using a linear least-squares fit with the Psf model. More...
 
class  PsfFluxTransform
 
class  SdssCentroidControl
 A C++ control class to handle SdssCentroidAlgorithm's configuration. More...
 
class  SdssCentroidAlgorithm
 The Sdss Centroid Algorithm. More...
 
class  SdssCentroidTransform
 
class  SdssShapeControl
 A C++ control class to handle SdssShapeAlgorithm's configuration. More...
 
class  SdssShapeResultKey
 A FunctorKey that maps SdssShapeResult to afw::table Records. More...
 
class  SdssShapeAlgorithm
 Measure the image moments of source using adaptive Gaussian weights. More...
 
class  SdssShapeResult
 Result object SdssShapeAlgorithm. More...
 
class  SdssShapeTransform
 
struct  ShapeResult
 A reusable struct for moments-based shape measurements. More...
 
class  ShapeResultKey
 A FunctorKey for ShapeResult. More...
 
class  SincCoeffs
 
class  BaseTransform
 

Typedefs

typedef int ElementCount
 
typedef double Flux
 
typedef double FluxErrElement
 
typedef double Mag
 
typedef double MagErrElement
 
typedef float ErrElement
 
typedef double CentroidElement
 
typedef double ShapeElement
 
typedef afw::geom::Point
< CentroidElement, 2 > 
Centroid
 
typedef Eigen::Matrix
< ErrElement,
2, 2, Eigen::DontAlign > 
CentroidCov
 
typedef
afw::geom::ellipses::Quadrupole 
Shape
 
typedef Eigen::Matrix
< ErrElement,
3, 3, Eigen::DontAlign > 
ShapeCov
 
typedef Eigen::Matrix
< ShapeElement,
3, 3, Eigen::DontAlign > 
ShapeTrMatrix
 

Enumerations

enum  UncertaintyEnum { NO_UNCERTAINTY = 0, SIGMA_ONLY = 1, FULL_COVARIANCE = 2 }
 An enum used to specify how much uncertainty information measurement algorithms provide. More...
 

Functions

 LSST_EXCEPTION_TYPE (FatalAlgorithmError, lsst::pex::exceptions::RuntimeError, lsst::meas::base::FatalAlgorithmError)
 Exception to be thrown when a measurement algorithm experiences a fatal error. More...
 
 LSST_EXCEPTION_TYPE (PixelValueError, lsst::pex::exceptions::DomainError, lsst::meas::base::PixelValueError)
 Exception to be thrown when a measurement algorithm encounters a NaN or infinite pixel. More...
 
ShapeTrMatrix makeShapeTransformMatrix (afw::geom::LinearTransform const &xform)
 Construct a matrix suitable for transforming second moments. More...
 
template<typename T >
afw::image::MaskedImage< T >
::SinglePixel 
computeShiftedValue (afw::image::MaskedImage< T > const &maskedImage, std::string const &warpingKernelName, afw::geom::Point2D const &fracShift, afw::geom::Point2I const &parentInd)
 

Typedef Documentation

Definition at line 56 of file constants.h.

typedef Eigen::Matrix<ErrElement,2,2,Eigen::DontAlign> lsst::meas::base::CentroidCov

Definition at line 57 of file constants.h.

Definition at line 54 of file constants.h.

Definition at line 48 of file constants.h.

Definition at line 53 of file constants.h.

typedef double lsst::meas::base::Flux

Definition at line 49 of file constants.h.

Definition at line 50 of file constants.h.

typedef double lsst::meas::base::Mag

Definition at line 51 of file constants.h.

Definition at line 52 of file constants.h.

Definition at line 58 of file constants.h.

typedef Eigen::Matrix<ErrElement,3,3,Eigen::DontAlign> lsst::meas::base::ShapeCov

Definition at line 59 of file constants.h.

Definition at line 55 of file constants.h.

typedef Eigen::Matrix<ShapeElement,3,3,Eigen::DontAlign> lsst::meas::base::ShapeTrMatrix

Definition at line 60 of file constants.h.

Enumeration Type Documentation

An enum used to specify how much uncertainty information measurement algorithms provide.

Currently, only ResultMappers (not Results) make use of these distinctions; Result structs always have data members that could hold the full-covariance, but may set some of these to NaN.

Enumerator
NO_UNCERTAINTY 

Algorithm provides no uncertainy information at all.

SIGMA_ONLY 

Only the diagonal elements of the covariance matrix are provided.

FULL_COVARIANCE 

The full covariance matrix is provided.

Definition at line 41 of file constants.h.

41  {
42  NO_UNCERTAINTY = 0,
43  SIGMA_ONLY = 1,
44  FULL_COVARIANCE = 2
45 };
Only the diagonal elements of the covariance matrix are provided.
Definition: constants.h:43
The full covariance matrix is provided.
Definition: constants.h:44
Algorithm provides no uncertainy information at all.
Definition: constants.h:42

Function Documentation

template<typename T >
afw::image::MaskedImage<T>::SinglePixel lsst::meas::base::computeShiftedValue ( afw::image::MaskedImage< T > const &  maskedImage,
std::string const &  warpingKernelName,
afw::geom::Point2D const &  fracShift,
afw::geom::Point2I const &  parentInd 
)

Compute the value of one pixel of an image after a fractional pixel shift Since we only want the value at one pixel, there is no need to shift the entire image; instead we simply convolve at one point.

Exceptions
pex::exceptions::RangeErrorif abs(fracShift) > 1 in either dimension
Parameters
maskedImagemasked image
warpingKernelNamewarping kernel name
fracShiftamount of sub-pixel shift (pixels)
parentIndparent index at which to compute pixel

Definition at line 129 of file PeakLikelihoodFlux.cc.

134  {
135  typedef typename afw::image::Exposure<T>::MaskedImageT MaskedImageT;
136  typedef typename afw::image::Image<double> KernelImageT;
137 
138  PTR(afw::math::SeparableKernel) warpingKernelPtr = afw::math::makeWarpingKernel(warpingKernelName);
139 
140  if ((std::abs(fracShift[0]) >= 1) || (std::abs(fracShift[1]) >= 1)) {
141  std::ostringstream os;
142  os << "fracShift = " << fracShift << " too large; abs value must be < 1 in both axes";
143  throw LSST_EXCEPT(pex::exceptions::RangeError, os.str());
144  }
145 
146  // warping kernels have even dimension and want the peak to the right of center
147  if (fracShift[0] < 0) {
148  warpingKernelPtr->setCtrX(warpingKernelPtr->getCtrX() + 1);
149  }
150  if (fracShift[1] < 0) {
151  warpingKernelPtr->setCtrY(warpingKernelPtr->getCtrY() + 1);
152  }
153  afw::geom::Box2I warpingOverlapBBox(
154  parentInd - afw::geom::Extent2I(warpingKernelPtr->getCtr()),
155  warpingKernelPtr->getDimensions());
156  if (!maskedImage.getBBox().contains(warpingOverlapBBox)) {
157  std::ostringstream os;
158  os << "Warping kernel extends off the edge"
159  << "; kernel bbox = " << warpingOverlapBBox
160  << "; exposure bbox = " << maskedImage.getBBox();
161  throw LSST_EXCEPT(pex::exceptions::RangeError, os.str());
162  }
163  warpingKernelPtr->setKernelParameters(std::make_pair(fracShift[0], fracShift[1]));
164  KernelImageT warpingKernelImage(warpingKernelPtr->getDimensions());
165  warpingKernelPtr->computeImage(warpingKernelImage, true);
166  typename KernelImageT::const_xy_locator const warpingKernelLoc = warpingKernelImage.xy_at(0,0);
167 
168  // Compute imLoc: an image locator that matches kernel locator (0,0) such that
169  // image ctrPix overlaps center of warping kernel
170  afw::geom::Point2I subimMin = warpingOverlapBBox.getMin();
171  typename MaskedImageT::const_xy_locator const mimageLoc = maskedImage.xy_at(subimMin.getX(), subimMin.getY());
172  return afw::math::convolveAtAPoint<MaskedImageT, MaskedImageT>(
173  mimageLoc, warpingKernelLoc, warpingKernelPtr->getWidth(), warpingKernelPtr->getHeight());
174 }
#define PTR(...)
Definition: base.h:41
boost::shared_ptr< SeparableKernel > makeWarpingKernel(std::string name)
Return a warping kernel given its name.
Point< int, 2 > Point2I
Definition: PSF.h:39
if(width!=gim.getWidth()||height!=gim.getHeight()||x0!=gim.getX0()||y0!=gim.getY0())
Definition: saturated.cc:47
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
tbl::Key< std::string > warpingKernelName
Definition: CoaddPsf.cc:320
Extent< int, 2 > Extent2I
Definition: Extent.h:355
lsst::meas::base::LSST_EXCEPTION_TYPE ( FatalAlgorithmError  ,
lsst::pex::exceptions::RuntimeError  ,
lsst::meas::base::FatalAlgorithmError   
)

Exception to be thrown when a measurement algorithm experiences a fatal error.

This error type causes the meas_base framework to throw completely out of the measurement loop which is run for each exposure, sourceCatalog pair.

lsst::meas::base::LSST_EXCEPTION_TYPE ( PixelValueError  ,
lsst::pex::exceptions::DomainError  ,
lsst::meas::base::PixelValueError   
)

Exception to be thrown when a measurement algorithm encounters a NaN or infinite pixel.

When caught by the plugin framework, this exception will generate a log message.

ShapeTrMatrix lsst::meas::base::makeShapeTransformMatrix ( afw::geom::LinearTransform const &  xform)

Construct a matrix suitable for transforming second moments.

Given an LinearTransform which maps from positions (x, y) to (a, d), returns a 3-by-3 matrix which transforms (xx, yy, xy) to (aa, dd, ad).

That is, given an input transform described by the matrix

| A11 | A12 | | A21 | A22 |

we return the matrix

| A11*A11 | A12*A12 | 2*A11*A12 | | A21*A21 | A22*A22 | 2*A21*A22 | | A11*A21 | A12*A22 | A11*A22 + A12*A21 |

Parameters
[in]xformLinearTransform describing the coordinate mapping
Returns
A 3-by-3 transformation matrix for the second order moments

Definition at line 166 of file ShapeUtilities.cc.

166  {
167  typedef afw::geom::LinearTransform LT;
168  Eigen::Matrix<ShapeElement,3,3,Eigen::DontAlign> m;
169  m << xform[LT::XX]*xform[LT::XX], xform[LT::XY]*xform[LT::XY], 2*xform[LT::XX]*xform[LT::XY],
170  xform[LT::YX]*xform[LT::YX], xform[LT::YY]*xform[LT::YY], 2*xform[LT::YX]*xform[LT::YY],
171  xform[LT::XX]*xform[LT::YX], xform[LT::XY]*xform[LT::YY],
172  xform[LT::XX]*xform[LT::YY] + xform[LT::XY]*xform[LT::YX];
173  return m;
174 }
tuple m
Definition: lsstimport.py:48