LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
Namespaces | Classes | Typedefs | Enumerations | Functions
lsst::meas::base Namespace Reference

Namespaces

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

Classes

class  BaseAlgorithm
 Ultimate abstract base class for all C++ measurement algorithms. More...
 
class  SingleFrameAlgorithm
 Base class for algorithms that measure the properties of sources on single image. 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  SimpleAlgorithm
 An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm and ForcedAlgorithm. More...
 
class  ApertureFluxControl
 Configuration object for multiple-aperture flux algorithms. More...
 
class  ApertureFluxAlgorithm
 Base class for multiple-aperture photometry 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  BlendednessControl
 
class  BlendednessAlgorithm
 Compute metrics that measure how blended objects are. More...
 
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  CentroidChecker
 
class  CircularApertureFluxAlgorithm
 
class  MeasurementError
 Exception to be thrown when a measurement algorithm experiences a known failure mode. More...
 
class  FatalAlgorithmError
 Exception to be thrown when a measurement algorithm experiences a fatal error. More...
 
class  PixelValueError
 Exception to be thrown when a measurement algorithm encounters a NaN or infinite pixel. 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...
 
struct  MagResult
 A reusable result struct for magnitudes. More...
 
class  MagResultKey
 A FunctorKey for MagResult. More...
 
class  FluxTransform
 Base for instFlux measurement transformations. More...
 
class  GaussianFluxControl
 A C++ control class to handle GaussianFluxAlgorithm's configuration. More...
 
class  GaussianFluxAlgorithm
 A measurement algorithm that estimates instFlux using an elliptical Gaussian weight. More...
 
class  GaussianFluxTransform
 
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  LocalBackgroundControl
 Configuration of LocalBackgroundAlgorithm. More...
 
class  LocalBackgroundAlgorithm
 A measurement algorithm that estimates the local background value per pixel. More...
 
class  LocalBackgroundTransform
 
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 instrument flux. More...
 
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  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 instFlux using a linear least-squares fit with the Psf model. More...
 
class  PsfFluxTransform
 
class  ScaledApertureFluxControl
 
class  ScaledApertureFluxAlgorithm
 Measure the instFlux in an aperture scaled to the PSF. More...
 
class  ScaledApertureFluxTransform
 
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
 Transformation for SdssShape measurements. More...
 
struct  ShapeResult
 A reusable struct for moments-based shape measurements. More...
 
class  ShapeResultKey
 A FunctorKey for ShapeResult. More...
 
class  SincCoeffs
 A singleton to calculate and cache the coefficients for sinc photometry. More...
 
class  BaseTransform
 Abstract base class for all C++ measurement transformations. 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 };
@ SIGMA_ONLY
Only the diagonal elements of the covariance matrix are provided.
Definition: constants.h:45
@ FULL_COVARIANCE
The full covariance matrix is provided.
Definition: constants.h:46
@ NO_UNCERTAINTY
Algorithm provides no uncertainy information at all.
Definition: constants.h:44

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 
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 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
std::ostream * os
Definition: Schema.cc:557
An integer coordinate rectangle.
Definition: Box.h:55
T make_pair(T... args)
std::shared_ptr< SeparableKernel > makeWarpingKernel(std::string name)
Return a warping kernel given its name.
Angle abs(Angle const &a)
Definition: Angle.h:106
afw::table::Key< std::string > warpingKernelName
Definition: CoaddPsf.cc:350

◆ 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 }
int m
Definition: SpanSet.cc:48
A 2D linear coordinate transformation.

◆ 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 }
def measure(mi, x, y, size, statistic, stats)
Definition: fringe.py:516

◆ 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 
49  cls.def(py::init<CircularApertureFluxAlgorithm::Control const &, std::string const &,
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::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

◆ 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 }
void declareAlgorithm(PyAlg &clsAlgorithm)
Wrap the implicit API used by meas_base's algorithms.
Definition: python.h:87

◆ 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 }
#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME)
Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.
Definition: python.h:50

◆ 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 }
ShapeTrMatrix makeShapeTransformMatrix(geom::LinearTransform const &xform)
Construct a matrix suitable for transforming second moments.

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