LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Namespaces | Classes | Typedefs | Enumerations | Functions
lsst::meas::base Namespace Reference

Namespaces

 apCorrRegistry
 
 applyApCorr
 
 baseMeasurement
 
 catalogCalculation
 
 classification
 
 footprintArea
 
 forcedMeasurement
 
 forcedPhotCcd
 
 forcedPhotCoadd
 
 forcedPhotImage
 
 measurementInvestigationLib
 
 noiseReplacer
 
 pluginRegistry
 
 plugins
 
 pluginsBase
 
 python
 
 references
 
 sfm
 
 tests
 
 transforms
 
 version
 
 wrappers
 

Classes

class  ApertureFluxAlgorithm
 Base class for multiple-aperture photometry algorithms. More...
 
class  ApertureFluxControl
 Configuration object for multiple-aperture flux algorithms. More...
 
struct  ApertureFluxResult
 A Result struct for running an aperture flux algorithm with a single radius. More...
 
class  ApertureFluxTransform
 Measurement transformation for aperture fluxes. More...
 
class  BaseAlgorithm
 Ultimate abstract base class for all C++ measurement algorithms. More...
 
class  BaseTransform
 Abstract base class for all C++ measurement transformations. More...
 
class  BlendednessAlgorithm
 Compute metrics that measure how blended objects are. More...
 
class  BlendednessControl
 
class  CentroidChecker
 
struct  CentroidResult
 A reusable struct for centroid measurements. More...
 
class  CentroidResultKey
 A FunctorKey for CentroidResult. More...
 
class  CentroidTransform
 Base for centroid measurement transformations. More...
 
class  CircularApertureFluxAlgorithm
 
class  FatalAlgorithmError
 Exception to be thrown when a measurement algorithm experiences a fatal error. More...
 
struct  FlagDefinition
 Simple class used to define and document flags The name and doc constitute the identity of the FlagDefinition The number is used for indexing, but is assigned arbitrarily. More...
 
class  FlagDefinitionList
 vector-type utility class to build a collection of FlagDefinitions More...
 
class  FlagHandler
 Utility class for handling flag fields that indicate the failure modes of an algorithm. More...
 
struct  FluxResult
 A reusable result struct for instFlux measurements. More...
 
class  FluxResultKey
 A FunctorKey for FluxResult. More...
 
class  FluxTransform
 Base for instFlux measurement transformations. More...
 
class  ForcedAlgorithm
 Base class for algorithms that measure the properties of sources on one image, using previous measurements on another image to hold certain quantities fixed. More...
 
class  GaussianFluxAlgorithm
 A measurement algorithm that estimates instFlux using an elliptical Gaussian weight. More...
 
class  GaussianFluxControl
 A C++ control class to handle GaussianFluxAlgorithm's configuration. More...
 
class  GaussianFluxTransform
 
class  LocalBackgroundAlgorithm
 A measurement algorithm that estimates the local background value per pixel. More...
 
class  LocalBackgroundControl
 Configuration of LocalBackgroundAlgorithm. More...
 
class  LocalBackgroundTransform
 
struct  MagResult
 A reusable result struct for magnitudes. More...
 
class  MagResultKey
 A FunctorKey for MagResult. More...
 
class  MeasurementError
 Exception to be thrown when a measurement algorithm experiences a known failure mode. More...
 
class  NaiveCentroidAlgorithm
 A class that calculates a centroid as a simple unweighted first moment of the 3x3 region around a pixel. More...
 
class  NaiveCentroidControl
 A C++ control class to handle NaiveCentroidAlgorithm's configuration. More...
 
class  NaiveCentroidTransform
 
class  PeakLikelihoodFluxAlgorithm
 A measurement algorithm that estimates the peak instrument flux, using a filtered image which has been convolved with its own PSF. More...
 
class  PeakLikelihoodFluxControl
 C++ control object for peak likelihood instrument flux. More...
 
class  PeakLikelihoodFluxTransform
 
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  PixelFlagsControl
 A C++ control class to handle PixelFlagsAlgorithm's configuration. More...
 
class  PixelValueError
 Exception to be thrown when a measurement algorithm encounters a NaN or infinite pixel. More...
 
class  PsfFluxAlgorithm
 A measurement algorithm that estimates instFlux using a linear least-squares fit with the Psf model. More...
 
class  PsfFluxControl
 A C++ control class to handle PsfFluxAlgorithm's configuration. More...
 
class  PsfFluxTransform
 
class  SafeCentroidExtractor
 Utility class for measurement algorithms that extracts a position from the Centroid slot and handles errors in a safe and consistent way. More...
 
class  SafeShapeExtractor
 Utility class for measurement algorithms that extracts an ellipse from the Shape slot and handles errors in a safe and consistent way. More...
 
class  ScaledApertureFluxAlgorithm
 Measure the instFlux in an aperture scaled to the PSF. More...
 
class  ScaledApertureFluxControl
 
class  ScaledApertureFluxTransform
 
class  SdssCentroidAlgorithm
 The Sdss Centroid Algorithm. More...
 
class  SdssCentroidControl
 A C++ control class to handle SdssCentroidAlgorithm's configuration. More...
 
class  SdssCentroidTransform
 
class  SdssShapeAlgorithm
 Measure the image moments of source using adaptive Gaussian weights. More...
 
class  SdssShapeControl
 A C++ control class to handle SdssShapeAlgorithm's configuration. More...
 
class  SdssShapeResult
 Result object SdssShapeAlgorithm. More...
 
class  SdssShapeResultKey
 A FunctorKey that maps SdssShapeResult to afw::table Records. More...
 
class  SdssShapeTransform
 Transformation for SdssShape measurements. More...
 
struct  ShapeResult
 A reusable struct for moments-based shape measurements. More...
 
class  ShapeResultKey
 A FunctorKey for ShapeResult. More...
 
class  SimpleAlgorithm
 An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm and ForcedAlgorithm. More...
 
class  SincCoeffs
 A singleton to calculate and cache the coefficients for sinc photometry. More...
 
class  SingleFrameAlgorithm
 Base class for algorithms that measure the properties of sources on single image. More...
 

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

ShapeTrMatrix makeShapeTransformMatrix (geom::LinearTransform const &xform)
 Construct a matrix suitable for transforming second moments. More...
 
 PYBIND11_MODULE (algorithm, mod)
 
 PYBIND11_MODULE (apertureFlux, mod)
 
 PYBIND11_MODULE (blendedness, mod)
 
 PYBIND11_MODULE (centroidUtilities, mod)
 
 PYBIND11_MODULE (circularApertureFlux, mod)
 
 PYBIND11_MODULE (exceptions, mod)
 
 PYBIND11_MODULE (flagHandler, mod)
 
 PYBIND11_MODULE (fluxUtilities, mod)
 
 PYBIND11_MODULE (gaussianFlux, mod)
 
 PYBIND11_MODULE (inputUtilities, mod)
 
 PYBIND11_MODULE (localBackground, mod)
 
 PYBIND11_MODULE (naiveCentroid, mod)
 
 PYBIND11_MODULE (peakLikelihoodFlux, mod)
 
 PYBIND11_MODULE (pixelFlags, mod)
 
 PYBIND11_MODULE (psfFlux, mod)
 
 PYBIND11_MODULE (scaledApertureFlux, mod)
 
 PYBIND11_MODULE (sdssCentroid, mod)
 
 PYBIND11_MODULE (sdssShape, mod)
 
 PYBIND11_MODULE (shapeUtilities, mod)
 
 PYBIND11_MODULE (sincCoeffs, mod)
 
 PYBIND11_MODULE (transform, mod)
 
template<typename T >
afw::image::MaskedImage< T >::SinglePixel computeShiftedValue (afw::image::MaskedImage< T > const &maskedImage, std::string const &warpingKernelName, geom::Point2D const &fracShift, 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. More...
 

Typedef Documentation

◆ Centroid

Definition at line 58 of file constants.h.

◆ CentroidCov

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

Definition at line 59 of file constants.h.

◆ CentroidElement

Definition at line 56 of file constants.h.

◆ ElementCount

Definition at line 50 of file constants.h.

◆ ErrElement

Definition at line 55 of file constants.h.

◆ Flux

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

Definition at line 51 of file constants.h.

◆ FluxErrElement

Definition at line 52 of file constants.h.

◆ Mag

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

Definition at line 53 of file constants.h.

◆ MagErrElement

Definition at line 54 of file constants.h.

◆ Shape

Definition at line 60 of file constants.h.

◆ ShapeCov

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

Definition at line 61 of file constants.h.

◆ ShapeElement

Definition at line 57 of file constants.h.

◆ ShapeTrMatrix

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

Definition at line 62 of file constants.h.

Enumeration Type Documentation

◆ UncertaintyEnum

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 43 of file constants.h.

43  {
44  NO_UNCERTAINTY = 0,
45  SIGMA_ONLY = 1,
46  FULL_COVARIANCE = 2
47 };

Function Documentation

◆ computeShiftedValue()

template<typename T >
afw::image::MaskedImage<T>::SinglePixel lsst::meas::base::computeShiftedValue ( afw::image::MaskedImage< T > const &  maskedImage,
std::string const &  warpingKernelName,
geom::Point2D const &  fracShift,
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 134 of file PeakLikelihoodFlux.cc.

139  {
140  typedef typename afw::image::Exposure<T>::MaskedImageT MaskedImageT;
141  typedef typename afw::image::Image<double> KernelImageT;
142 
143  PTR(afw::math::SeparableKernel) warpingKernelPtr = afw::math::makeWarpingKernel(warpingKernelName);
144 
145  if ((std::abs(fracShift[0]) >= 1) || (std::abs(fracShift[1]) >= 1)) {
147  os << "fracShift = " << fracShift << " too large; abs value must be < 1 in both axes";
148  throw LSST_EXCEPT(pex::exceptions::RangeError, os.str());
149  }
150 
151  // warping kernels have even dimension and want the peak to the right of center
152  if (fracShift[0] < 0) {
153  warpingKernelPtr->setCtr(warpingKernelPtr->getCtr() + geom::Extent2I(1, 0));
154  }
155  if (fracShift[1] < 0) {
156  warpingKernelPtr->setCtr(warpingKernelPtr->getCtr() + geom::Extent2I(0, 1));
157  }
158  geom::Box2I warpingOverlapBBox(parentInd - geom::Extent2I(warpingKernelPtr->getCtr()),
159  warpingKernelPtr->getDimensions());
160  if (!maskedImage.getBBox().contains(warpingOverlapBBox)) {
162  os << "Warping kernel extends off the edge"
163  << "; kernel bbox = " << warpingOverlapBBox << "; exposure bbox = " << maskedImage.getBBox();
164  throw LSST_EXCEPT(pex::exceptions::RangeError, os.str());
165  }
166  warpingKernelPtr->setKernelParameters(std::make_pair(fracShift[0], fracShift[1]));
167  KernelImageT warpingKernelImage(warpingKernelPtr->getDimensions());
168  warpingKernelPtr->computeImage(warpingKernelImage, true);
169  typename KernelImageT::const_xy_locator const warpingKernelLoc = warpingKernelImage.xy_at(0, 0);
170 
171  // Compute imLoc: an image locator that matches kernel locator (0,0) such that
172  // image ctrPix overlaps center of warping kernel
173  geom::Point2I subimMin = warpingOverlapBBox.getMin();
174  typename MaskedImageT::const_xy_locator const mimageLoc =
175  maskedImage.xy_at(subimMin.getX(), subimMin.getY());
176  return afw::math::convolveAtAPoint<MaskedImageT, MaskedImageT>(
177  mimageLoc, warpingKernelLoc, warpingKernelPtr->getWidth(), warpingKernelPtr->getHeight());
178 }

◆ makeShapeTransformMatrix()

ShapeTrMatrix lsst::meas::base::makeShapeTransformMatrix ( 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 143 of file ShapeUtilities.cc.

143  {
144  typedef geom::LinearTransform LT;
145  Eigen::Matrix<ShapeElement, 3, 3, Eigen::DontAlign> m;
146  m << xform[LT::XX] * xform[LT::XX], xform[LT::XY] * xform[LT::XY], 2 * xform[LT::XX] * xform[LT::XY],
147  xform[LT::YX] * xform[LT::YX], xform[LT::YY] * xform[LT::YY], 2 * xform[LT::YX] * xform[LT::YY],
148  xform[LT::XX] * xform[LT::YX], xform[LT::XY] * xform[LT::YY],
149  xform[LT::XX] * xform[LT::YY] + xform[LT::XY] * xform[LT::YX];
150  return m;
151 }

◆ PYBIND11_MODULE() [1/21]

lsst::meas::base::PYBIND11_MODULE ( algorithm  ,
mod   
)

Definition at line 35 of file algorithm.cc.

35  {
36  py::module::import("lsst.afw.image");
37  py::module::import("lsst.afw.table");
38 
39  py::class_<BaseAlgorithm, std::shared_ptr<BaseAlgorithm>> clsBaseAlgorithm(mod, "BaseAlgorithm");
40  py::class_<SingleFrameAlgorithm, std::shared_ptr<SingleFrameAlgorithm>, BaseAlgorithm>
41  clsSingleFrameAlgorithm(mod, "SingleFrameAlgorithm");
42  py::class_<SimpleAlgorithm, std::shared_ptr<SimpleAlgorithm>, SingleFrameAlgorithm> clsSimpleAlgorithm(
43  mod, "SimpleAlgorithm", py::multiple_inheritance());
44 
45  clsBaseAlgorithm.def("fail", &BaseAlgorithm::fail, "measRecord"_a, "error"_a = NULL);
46  clsBaseAlgorithm.def("getLogName", &SimpleAlgorithm::getLogName);
47 
48  clsSingleFrameAlgorithm.def("measure", &SingleFrameAlgorithm::measure, "record"_a, "exposure"_a);
49 
50  clsSimpleAlgorithm.def("measureForced", &SimpleAlgorithm::measureForced, "measRecord"_a, "exposure"_a,
51  "refRecord"_a, "refWcs"_a);
52 }

◆ PYBIND11_MODULE() [2/21]

lsst::meas::base::PYBIND11_MODULE ( apertureFlux  ,
mod   
)

Definition at line 129 of file apertureFlux.cc.

129  {
130  py::module::import("lsst.afw.geom");
131  py::module::import("lsst.afw.image");
132  py::module::import("lsst.afw.table");
133  py::module::import("lsst.meas.base.algorithm");
134  py::module::import("lsst.meas.base.flagHandler");
135  py::module::import("lsst.meas.base.fluxUtilities");
136  py::module::import("lsst.meas.base.transform");
137 
138  auto clsFluxControl = declareFluxControl(mod);
139  auto clsFluxAlgorithm = declareFluxAlgorithm(mod);
140  declareFluxResult(mod);
141  auto clsFluxTransform = declareFluxTransform(mod);
142 
143  clsFluxAlgorithm.attr("Control") = clsFluxControl;
144  // no need to make ApertureFluxControl::Result visible to Python
145  clsFluxTransform.attr("Control") = clsFluxControl;
146 
147  python::declareAlgorithm<ApertureFluxAlgorithm, ApertureFluxControl, ApertureFluxTransform>(
148  clsFluxAlgorithm, clsFluxControl, clsFluxTransform);
149 }

◆ PYBIND11_MODULE() [3/21]

lsst::meas::base::PYBIND11_MODULE ( blendedness  ,
mod   
)

Definition at line 81 of file blendedness.cc.

81  {
82  py::module::import("lsst.afw.table");
83  py::module::import("lsst.meas.base.algorithm");
84  py::module::import("lsst.meas.base.flagHandler");
85 
86  auto clsBlendednessControl = declareBlendednessControl(mod);
87  auto clsBlendednessAlgorithm = declareBlendednessAlgorithm(mod);
88 
89  clsBlendednessAlgorithm.attr("Control") = clsBlendednessControl;
90 
91  python::declareAlgorithm<BlendednessAlgorithm, BlendednessControl>(clsBlendednessAlgorithm,
92  clsBlendednessControl);
93 }

◆ PYBIND11_MODULE() [4/21]

lsst::meas::base::PYBIND11_MODULE ( centroidUtilities  ,
mod   
)

Definition at line 122 of file centroidUtilities.cc.

122  {
123  py::module::import("lsst.afw.table");
124  py::module::import("lsst.meas.base.transform");
125 
126  declareCentroidResult(mod);
127  declareCentroidResultKey(mod);
128  declareCentroidTransform(mod);
129  declareCentroidChecker(mod);
130  declareUncertaintyEnum(mod);
131 }

◆ PYBIND11_MODULE() [5/21]

lsst::meas::base::PYBIND11_MODULE ( circularApertureFlux  ,
mod   
)

Definition at line 42 of file circularApertureFlux.cc.

42  {
43  py::module::import("lsst.daf.base");
44  py::module::import("lsst.afw.table");
45  py::module::import("lsst.meas.base.algorithm");
46 
47  PyApertureFluxClass cls(mod, "CircularApertureFluxAlgorithm");
48 
50  afw::table::Schema &, daf::base::PropertySet &>(),
51  "ctrl"_a, "name"_a, "schema"_a, "metadata"_a);
52 
53  cls.def("measure", &CircularApertureFluxAlgorithm::measure, "measRecord"_a, "exposure"_a);
54 }

◆ PYBIND11_MODULE() [6/21]

lsst::meas::base::PYBIND11_MODULE ( exceptions  ,
mod   
)

Definition at line 36 of file exceptions.cc.

36  {
38  using pex::exceptions::DomainError;
39  using pex::exceptions::RuntimeError;
40 
41  py::module::import("lsst.pex.exceptions");
42 
43  auto clsFatalAlgorithmError =
44  declareException<FatalAlgorithmError, RuntimeError>(mod, "FatalAlgorithmError", "RuntimeError");
45  auto clsMeasurementError =
46  declareException<MeasurementError, RuntimeError>(mod, "MeasurementError", "RuntimeError");
47  auto clsPixelValueError =
48  declareException<PixelValueError, DomainError>(mod, "PixelValueError", "DomainError");
49 
50  clsMeasurementError.def(py::init<std::string const &, std::size_t>(), "message"_a, "flagBit"_a);
51  clsFatalAlgorithmError.def(py::init<std::string const &>(), "message"_a);
52  clsPixelValueError.def(py::init<std::string const &>(), "message"_a);
53 
54  clsMeasurementError.def("getFlagBit", &MeasurementError::getFlagBit);
55 }

◆ PYBIND11_MODULE() [7/21]

lsst::meas::base::PYBIND11_MODULE ( flagHandler  ,
mod   
)

Definition at line 121 of file flagHandler.cc.

121  {
122  py::module::import("lsst.afw.table");
123 
124  declareFlagDefinition(mod);
125  declareFlagDefinitionList(mod);
126  declareFlagHandler(mod);
127 }

◆ PYBIND11_MODULE() [8/21]

lsst::meas::base::PYBIND11_MODULE ( fluxUtilities  ,
mod   
)

Definition at line 91 of file fluxUtilities.cc.

91  {
92  py::module::import("lsst.afw.table");
93 
94  declareFluxResult(mod);
95  declareFluxResultKey(mod);
96  declareMagResult(mod);
97  declareMagResultKey(mod);
98 }

◆ PYBIND11_MODULE() [9/21]

lsst::meas::base::PYBIND11_MODULE ( gaussianFlux  ,
mod   
)

Definition at line 81 of file gaussianFlux.cc.

81  {
82  py::module::import("lsst.afw.table");
83  py::module::import("lsst.meas.base.algorithm");
84  py::module::import("lsst.meas.base.flagHandler");
85  py::module::import("lsst.meas.base.transform");
86 
87  auto clsFluxControl = declareFluxControl(mod);
88  auto clsFluxAlgorithm = declareFluxAlgorithm(mod);
89  auto clsFluxTransform = declareFluxTransform(mod);
90 
91  clsFluxAlgorithm.attr("Control") = clsFluxControl;
92  clsFluxTransform.attr("Control") = clsFluxControl;
93 
94  python::declareAlgorithm<GaussianFluxAlgorithm, GaussianFluxControl, GaussianFluxTransform>(
95  clsFluxAlgorithm, clsFluxControl, clsFluxTransform);
96 }

◆ PYBIND11_MODULE() [10/21]

lsst::meas::base::PYBIND11_MODULE ( inputUtilities  ,
mod   
)

Definition at line 35 of file inputUtilities.cc.

35  {
36  py::module::import("lsst.afw.table");
37 
38  py::class_<SafeCentroidExtractor> clsSafeCentroidExtractor(mod, "SafeCentroidExtractor");
39 
40  clsSafeCentroidExtractor.def(py::init<afw::table::Schema &, std::string const &, bool>(), "schema"_a,
41  "name"_a, "isCentroider"_a = false);
42 
43  clsSafeCentroidExtractor.def("__call__",
44  [](SafeCentroidExtractor const &self, afw::table::SourceRecord &record,
45  FlagHandler const &flags) { return self(record, flags); },
46  "record"_a, "flags"_a);
47 }

◆ PYBIND11_MODULE() [11/21]

lsst::meas::base::PYBIND11_MODULE ( localBackground  ,
mod   
)

Definition at line 90 of file localBackground.cc.

90  {
91  py::module::import("lsst.afw.table");
92  py::module::import("lsst.meas.base.algorithm");
93  py::module::import("lsst.meas.base.flagHandler");
94  py::module::import("lsst.meas.base.fluxUtilities");
95  py::module::import("lsst.meas.base.transform");
96 
97  auto clsControl = declareControl(mod);
98  auto clsAlgorithm = declareAlgorithm(mod);
99  auto clsTransform = declareTransform(mod);
100 
101  clsAlgorithm.attr("Control") = clsControl;
102  clsTransform.attr("Control") = clsControl;
103 
104  python::declareAlgorithm<LocalBackgroundAlgorithm, LocalBackgroundControl, LocalBackgroundTransform>(
105  clsAlgorithm, clsControl, clsTransform);
106 }

◆ PYBIND11_MODULE() [12/21]

lsst::meas::base::PYBIND11_MODULE ( naiveCentroid  ,
mod   
)

Definition at line 87 of file naiveCentroid.cc.

87  {
88  py::module::import("lsst.afw.table");
89  py::module::import("lsst.meas.base.algorithm");
90  py::module::import("lsst.meas.base.flagHandler");
91  py::module::import("lsst.meas.base.transform");
92 
93  auto clsCentroidControl = declareCentroidControl(mod);
94  auto clsCentroidAlgorithm = declareCentroidAlgorithm(mod);
95  auto clsCentroidTransform = declareCentroidTransform(mod);
96 
97  clsCentroidAlgorithm.attr("Control") = clsCentroidControl;
98  clsCentroidTransform.attr("Control") = clsCentroidControl;
99 
100  python::declareAlgorithm<NaiveCentroidAlgorithm, NaiveCentroidControl, NaiveCentroidTransform>(
101  clsCentroidAlgorithm, clsCentroidControl, clsCentroidTransform);
102 }

◆ PYBIND11_MODULE() [13/21]

lsst::meas::base::PYBIND11_MODULE ( peakLikelihoodFlux  ,
mod   
)

Definition at line 80 of file peakLikelihoodFlux.cc.

80  {
81  py::module::import("lsst.afw.table");
82  py::module::import("lsst.meas.base.algorithm");
83  py::module::import("lsst.meas.base.flagHandler");
84  py::module::import("lsst.meas.base.transform");
85 
86  auto clsFluxControl = declareFluxControl(mod);
87  auto clsFluxAlgorithm = declareFluxAlgorithm(mod);
88  auto clsFluxTransform = declareFluxTransform(mod);
89 
90  clsFluxAlgorithm.attr("Control") = clsFluxControl;
91  clsFluxTransform.attr("Control") = clsFluxControl;
92 
93  python::declareAlgorithm<PeakLikelihoodFluxAlgorithm, PeakLikelihoodFluxControl,
94  PeakLikelihoodFluxTransform>(clsFluxAlgorithm, clsFluxControl, clsFluxTransform);
95 }

◆ PYBIND11_MODULE() [14/21]

lsst::meas::base::PYBIND11_MODULE ( pixelFlags  ,
mod   
)

Definition at line 40 of file pixelFlags.cc.

40  {
41  py::module::import("lsst.afw.table");
42 
43  py::class_<PixelFlagsAlgorithm, std::shared_ptr<PixelFlagsAlgorithm>, SimpleAlgorithm>
44  clsPixelFlagsAlgorithm(mod, "PixelFlagsAlgorithm");
45  py::class_<PixelFlagsControl> clsPixelFlagsControl(mod, "PixelFlagsControl");
46 
47  clsPixelFlagsAlgorithm.def(
48  py::init<PixelFlagsAlgorithm::Control const &, std::string const &, afw::table::Schema &>(),
49  "ctrl"_a, "name"_a, "schema"_a);
50 
51  clsPixelFlagsControl.def(py::init<>());
52 
53  clsPixelFlagsAlgorithm.def("measure", &PixelFlagsAlgorithm::measure, "measRecord"_a, "exposure"_a);
54  clsPixelFlagsAlgorithm.def("fail", &PixelFlagsAlgorithm::fail, "measRecord"_a, "error"_a = nullptr);
55 
56  LSST_DECLARE_CONTROL_FIELD(clsPixelFlagsControl, PixelFlagsControl, masksFpAnywhere);
57  LSST_DECLARE_CONTROL_FIELD(clsPixelFlagsControl, PixelFlagsControl, masksFpCenter);
58 }

◆ PYBIND11_MODULE() [15/21]

lsst::meas::base::PYBIND11_MODULE ( psfFlux  ,
mod   
)

Definition at line 84 of file psfFlux.cc.

84  {
85  py::module::import("lsst.afw.table");
86  py::module::import("lsst.meas.base.algorithm");
87  py::module::import("lsst.meas.base.flagHandler");
88  py::module::import("lsst.meas.base.fluxUtilities");
89  py::module::import("lsst.meas.base.transform");
90 
91  auto clsFluxControl = declareFluxControl(mod);
92  auto clsFluxAlgorithm = declareFluxAlgorithm(mod);
93  auto clsFluxTransform = declareFluxTransform(mod);
94 
95  clsFluxAlgorithm.attr("Control") = clsFluxControl;
96  clsFluxTransform.attr("Control") = clsFluxControl;
97 
98  python::declareAlgorithm<PsfFluxAlgorithm, PsfFluxControl, PsfFluxTransform>(
99  clsFluxAlgorithm, clsFluxControl, clsFluxTransform);
100 }

◆ PYBIND11_MODULE() [16/21]

lsst::meas::base::PYBIND11_MODULE ( scaledApertureFlux  ,
mod   
)

Definition at line 83 of file scaledApertureFlux.cc.

83  {
84  py::module::import("lsst.afw.table");
85  py::module::import("lsst.meas.base.algorithm");
86  py::module::import("lsst.meas.base.fluxUtilities");
87  py::module::import("lsst.meas.base.transform");
88 
89  auto clsFluxControl = declareFluxControl(mod);
90  auto clsFluxAlgorithm = declareFluxAlgorithm(mod);
91  auto clsFluxTransform = declareFluxTransform(mod);
92 
93  clsFluxAlgorithm.attr("Control") = clsFluxControl;
94  clsFluxTransform.attr("Control") = clsFluxControl;
95 
96  python::declareAlgorithm<ScaledApertureFluxAlgorithm, ScaledApertureFluxControl,
97  ScaledApertureFluxTransform>(clsFluxAlgorithm, clsFluxControl, clsFluxTransform);
98 }

◆ PYBIND11_MODULE() [17/21]

lsst::meas::base::PYBIND11_MODULE ( sdssCentroid  ,
mod   
)

Definition at line 91 of file sdssCentroid.cc.

91  {
92  py::module::import("lsst.afw.table");
93  py::module::import("lsst.meas.base.algorithm");
94  py::module::import("lsst.meas.base.flagHandler");
95  py::module::import("lsst.meas.base.transform");
96 
97  auto clsCentroidControl = declareCentroidControl(mod);
98  auto clsCentroidAlgorithm = declareCentroidAlgorithm(mod);
99  auto clsCentroidTransform = declareCentroidTransform(mod);
100 
101  clsCentroidAlgorithm.attr("Control") = clsCentroidControl;
102  clsCentroidTransform.attr("Control") = clsCentroidControl;
103 
104  python::declareAlgorithm<SdssCentroidAlgorithm, SdssCentroidControl, SdssCentroidTransform>(
105  clsCentroidAlgorithm, clsCentroidControl, clsCentroidTransform);
106 }

◆ PYBIND11_MODULE() [18/21]

lsst::meas::base::PYBIND11_MODULE ( sdssShape  ,
mod   
)

Definition at line 156 of file sdssShape.cc.

156  {
157  py::module::import("lsst.afw.geom");
158  py::module::import("lsst.afw.table");
159  py::module::import("lsst.meas.base.algorithm");
160  py::module::import("lsst.meas.base.flagHandler");
161  py::module::import("lsst.meas.base.centroidUtilities"); // for CentroidResult
162  py::module::import("lsst.meas.base.fluxUtilities"); // for FluxResult
163  py::module::import("lsst.meas.base.shapeUtilities");
164  py::module::import("lsst.meas.base.transform");
165 
166  auto clsShapeControl = declareShapeControl(mod);
167  declareShapeResultKey(mod);
168  auto clsShapeAlgorithm = declareShapeAlgorithm(mod);
169  declareShapeResult(mod);
170  auto clsShapeTransform = declareShapeTransform(mod);
171 
172  clsShapeAlgorithm.attr("Control") = clsShapeControl;
173  clsShapeTransform.attr("Control") = clsShapeControl;
174 
175  python::declareAlgorithm<SdssShapeAlgorithm, SdssShapeControl, SdssShapeTransform>(
176  clsShapeAlgorithm, clsShapeControl, clsShapeTransform);
177 }

◆ PYBIND11_MODULE() [19/21]

lsst::meas::base::PYBIND11_MODULE ( shapeUtilities  ,
mod   
)

Definition at line 101 of file shapeUtilities.cc.

101  {
102  py::module::import("lsst.afw.table");
103 
104  declareShapeResult(mod);
105  declareShapeResultKey(mod);
106 
107  mod.def("makeShapeTransformMatrix", &makeShapeTransformMatrix, "xform"_a);
108 }

◆ PYBIND11_MODULE() [20/21]

lsst::meas::base::PYBIND11_MODULE ( sincCoeffs  ,
mod   
)

Definition at line 46 of file sincCoeffs.cc.

46  {
47  py::module::import("lsst.afw.geom");
48  py::module::import("lsst.afw.image");
49 
50  declareSincCoeffs<float>(mod, "F");
51  declareSincCoeffs<double>(mod, "D");
52 }

◆ PYBIND11_MODULE() [21/21]

lsst::meas::base::PYBIND11_MODULE ( transform  ,
mod   
)

Definition at line 36 of file transform.cc.

36  {
37  py::class_<BaseTransform, std::shared_ptr<BaseTransform>> cls(mod, "BaseTransform");
38 
39  cls.def("__call__", &BaseTransform::operator(), "inputCatalog"_a, "outputCatalog"_a, "wcs"_a,
40  "photoCalib"_a);
41 }
lsst::meas::base::FULL_COVARIANCE
@ FULL_COVARIANCE
The full covariance matrix is provided.
Definition: constants.h:46
lsst::meas::base.plugins.ScaledApertureFluxTransform
ScaledApertureFluxTransform
Definition: plugins.py:93
std::string
STL class.
lsst::meas::base::NO_UNCERTAINTY
@ NO_UNCERTAINTY
Algorithm provides no uncertainy information at all.
Definition: constants.h:44
lsst::meas::base::SIGMA_ONLY
@ SIGMA_ONLY
Only the diagonal elements of the covariance matrix are provided.
Definition: constants.h:45
lsst::sphgeom::abs
Angle abs(Angle const &a)
Definition: Angle.h:106
lsst::geom::LinearTransform
A 2D linear coordinate transformation.
Definition: LinearTransform.h:69
lsst::afw::math::makeWarpingKernel
std::shared_ptr< SeparableKernel > makeWarpingKernel(std::string name)
Return a warping kernel given its name.
Definition: warpExposure.cc:161
warpingKernelName
afw::table::Key< std::string > warpingKernelName
Definition: CoaddPsf.cc:341
lsst::afw::geom.transform.transformContinued.cls
cls
Definition: transformContinued.py:33
lsst::meas::base::python::declareAlgorithm
void declareAlgorithm(PyAlg &clsAlgorithm)
Wrap the implicit API used by meas_base's algorithms.
Definition: python.h:87
lsst::pex::exceptions::python::declareException
pybind11::class_< T, E > declareException(pybind11::module &mod, const std::string &name, const std::string &base)
Helper function for pybind11, used to define new types of exceptions.
Definition: Exception.h:52
lsst::meas::base.plugins.PeakLikelihoodFluxTransform
PeakLikelihoodFluxTransform
Definition: plugins.py:80
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
std::ostringstream
STL class.
os
std::ostream * os
Definition: Schema.cc:746
lsst::meas::base.plugins.PeakLikelihoodFluxAlgorithm
PeakLikelihoodFluxAlgorithm
Definition: plugins.py:79
lsst::meas::base::makeShapeTransformMatrix
ShapeTrMatrix makeShapeTransformMatrix(geom::LinearTransform const &xform)
Construct a matrix suitable for transforming second moments.
Definition: ShapeUtilities.cc:143
PTR
#define PTR(...)
Definition: base.h:41
lsst::geom::Point< int, 2 >
lsst::geom::Box2I
An integer coordinate rectangle.
Definition: Box.h:55
LSST_DECLARE_CONTROL_FIELD
#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME)
Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.
Definition: python.h:50
std::make_pair
T make_pair(T... args)
lsst::utils.tests.init
def init()
Definition: tests.py:58
lsst::ip::isr.fringe.measure
def measure(mi, x, y, size, statistic, stats)
Definition: fringe.py:506
lsst::ip::diffim.Control
Control
Definition: __init__.py:49
lsst::geom::Extent< int, 2 >
lsst::meas::base.plugins.ScaledApertureFluxAlgorithm
ScaledApertureFluxAlgorithm
Definition: plugins.py:92
m
int m
Definition: SpanSet.cc:49