lsst.meas.base  14.0-20-g83dc6f3+1
plugins.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # LSST Data Management System
4 # Copyright 2008-2016 AURA/LSST.
5 #
6 # This product includes software developed by the
7 # LSST Project (http://www.lsst.org/).
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the LSST License Statement and
20 # the GNU General Public License along with this program. If not,
21 # see <http://www.lsstcorp.org/LegalNotices/>.
22 #
23 """
24 Definitions and registration of pure-Python plugins with trivial implementations,
25 and automatic plugin-from-algorithm calls for those implemented in C++.
26 """
27 from __future__ import absolute_import, division, print_function
28 
29 import numpy
30 
32 import lsst.afw.detection
33 import lsst.afw.geom
34 from lsst.afw.geom.skyWcs import makeWcsPairTransform
35 
36 from .pluginRegistry import register
37 from .pluginsBase import BasePlugin
38 from .baseMeasurement import BaseMeasurementPluginConfig
39 from .sfm import SingleFramePluginConfig, SingleFramePlugin
40 from .forcedMeasurement import ForcedPluginConfig, ForcedPlugin
41 from .wrappers import wrapSimpleAlgorithm, wrapTransform, GenericPlugin
42 from .transforms import SimpleCentroidTransform
43 
44 from .apertureFlux import ApertureFluxControl, ApertureFluxTransform
45 from .transform import BaseTransform
46 from .blendedness import BlendednessAlgorithm, BlendednessControl
47 from .circularApertureFlux import CircularApertureFluxAlgorithm
48 from .gaussianFlux import GaussianFluxAlgorithm, GaussianFluxControl, GaussianFluxTransform
49 from .exceptions import MeasurementError
50 from .localBackground import LocalBackgroundControl, LocalBackgroundAlgorithm, LocalBackgroundTransform
51 from .naiveCentroid import NaiveCentroidAlgorithm, NaiveCentroidControl, NaiveCentroidTransform
52 from .peakLikelihoodFlux import PeakLikelihoodFluxAlgorithm, PeakLikelihoodFluxControl, \
53  PeakLikelihoodFluxTransform
54 from .pixelFlags import PixelFlagsAlgorithm, PixelFlagsControl
55 from .psfFlux import PsfFluxAlgorithm, PsfFluxControl, PsfFluxTransform
56 from .scaledApertureFlux import ScaledApertureFluxAlgorithm, ScaledApertureFluxControl, \
57  ScaledApertureFluxTransform
58 from .sdssCentroid import SdssCentroidAlgorithm, SdssCentroidControl, SdssCentroidTransform
59 from .sdssShape import SdssShapeAlgorithm, SdssShapeControl, SdssShapeTransform
60 
61 __all__ = (
62  "SingleFrameFPPositionConfig", "SingleFrameFPPositionPlugin",
63  "SingleFrameJacobianConfig", "SingleFrameJacobianPlugin",
64  "VarianceConfig", "SingleFrameVariancePlugin", "ForcedVariancePlugin",
65  "InputCountConfig", "SingleFrameInputCountPlugin", "ForcedInputCountPlugin",
66  "SingleFramePeakCentroidConfig", "SingleFramePeakCentroidPlugin",
67  "SingleFrameSkyCoordConfig", "SingleFrameSkyCoordPlugin",
68  "ForcedPeakCentroidConfig", "ForcedPeakCentroidPlugin",
69  "ForcedTransformedCentroidConfig", "ForcedTransformedCentroidPlugin",
70  "ForcedTransformedShapeConfig", "ForcedTransformedShapePlugin",
71 )
72 
73 # --- Wrapped C++ Plugins ---
74 
75 wrapSimpleAlgorithm(PsfFluxAlgorithm, Control=PsfFluxControl,
76  TransformClass=PsfFluxTransform, executionOrder=BasePlugin.FLUX_ORDER,
77  shouldApCorr=True, hasLogName=True)
78 wrapSimpleAlgorithm(PeakLikelihoodFluxAlgorithm, Control=PeakLikelihoodFluxControl,
79  TransformClass=PeakLikelihoodFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)
80 wrapSimpleAlgorithm(GaussianFluxAlgorithm, Control=GaussianFluxControl,
81  TransformClass=GaussianFluxTransform, executionOrder=BasePlugin.FLUX_ORDER,
82  shouldApCorr=True)
83 wrapSimpleAlgorithm(NaiveCentroidAlgorithm, Control=NaiveCentroidControl,
84  TransformClass=NaiveCentroidTransform, executionOrder=BasePlugin.CENTROID_ORDER)
85 wrapSimpleAlgorithm(SdssCentroidAlgorithm, Control=SdssCentroidControl,
86  TransformClass=SdssCentroidTransform, executionOrder=BasePlugin.CENTROID_ORDER)
87 wrapSimpleAlgorithm(PixelFlagsAlgorithm, Control=PixelFlagsControl,
88  executionOrder=BasePlugin.FLUX_ORDER)
89 wrapSimpleAlgorithm(SdssShapeAlgorithm, Control=SdssShapeControl,
90  TransformClass=SdssShapeTransform, executionOrder=BasePlugin.SHAPE_ORDER)
91 wrapSimpleAlgorithm(ScaledApertureFluxAlgorithm, Control=ScaledApertureFluxControl,
92  TransformClass=ScaledApertureFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)
93 
94 wrapSimpleAlgorithm(CircularApertureFluxAlgorithm, needsMetadata=True, Control=ApertureFluxControl,
95  TransformClass=ApertureFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)
96 wrapSimpleAlgorithm(BlendednessAlgorithm, Control=BlendednessControl,
97  TransformClass=BaseTransform, executionOrder=BasePlugin.SHAPE_ORDER)
98 
99 wrapSimpleAlgorithm(LocalBackgroundAlgorithm, Control=LocalBackgroundControl,
100  TransformClass=LocalBackgroundTransform, executionOrder=BasePlugin.FLUX_ORDER)
101 
102 wrapTransform(PsfFluxTransform)
103 wrapTransform(PeakLikelihoodFluxTransform)
104 wrapTransform(GaussianFluxTransform)
105 wrapTransform(NaiveCentroidTransform)
106 wrapTransform(SdssCentroidTransform)
107 wrapTransform(SdssShapeTransform)
108 wrapTransform(ScaledApertureFluxTransform)
109 wrapTransform(ApertureFluxTransform)
110 wrapTransform(LocalBackgroundTransform)
111 
112 # --- Single-Frame Measurement Plugins ---
113 
114 
116  pass
117 
118 
119 @register("base_FPPosition")
121  '''
122  Algorithm to calculate the position of a centroid on the focal plane
123  '''
124 
125  ConfigClass = SingleFrameFPPositionConfig
126 
127  @classmethod
129  return cls.SHAPE_ORDER
130 
131  def __init__(self, config, name, schema, metadata):
132  SingleFramePlugin.__init__(self, config, name, schema, metadata)
133  self.focalValue = lsst.afw.table.Point2DKey.addFields(schema, name, "Position on the focal plane",
134  "mm")
135  self.focalFlag = schema.addField(name + "_flag", type="Flag", doc="Set to True for any fatal failure")
136  self.detectorFlag = schema.addField(name + "_missingDetector_flag", type="Flag",
137  doc="Set to True if detector object is missing")
138 
139  def measure(self, measRecord, exposure):
140  det = exposure.getDetector()
141  if not det:
142  measRecord.set(self.detectorFlag, True)
143  fp = lsst.afw.geom.Point2D(numpy.nan, numpy.nan)
144  else:
145  center = measRecord.getCentroid()
146  posInPix = det.makeCameraPoint(center, lsst.afw.cameraGeom.PIXELS)
147  fp = det.transform(posInPix, lsst.afw.cameraGeom.FOCAL_PLANE).getPoint()
148  measRecord.set(self.focalValue, fp)
149 
150  def fail(self, measRecord, error=None):
151  measRecord.set(self.focalFlag, True)
152 
153 
155  pixelScale = lsst.pex.config.Field(dtype=float, default=0.5, doc="Nominal pixel size (arcsec)")
156 
157 
158 @register("base_Jacobian")
160  '''
161  Algorithm which computes the Jacobian about a source and computes its ratio with a nominal pixel area.
162  This allows one to compare relative instead of absolute areas of pixels.
163  '''
164 
165  ConfigClass = SingleFrameJacobianConfig
166 
167  @classmethod
169  return cls.SHAPE_ORDER
170 
171  def __init__(self, config, name, schema, metadata):
172  SingleFramePlugin.__init__(self, config, name, schema, metadata)
173  self.jacValue = schema.addField(name + '_value', type="D", doc="Jacobian correction")
174  self.jacFlag = schema.addField(name + '_flag', type="Flag", doc="Set to 1 for any fatal failure")
175  # Calculate one over the area of a nominal reference pixel, where area is in arcsec^2
176  self.scale = pow(self.config.pixelScale, -2)
177 
178  def measure(self, measRecord, exposure):
179  center = measRecord.getCentroid()
180  # Compute the area of a pixel at a source record's centroid, and take the
181  # ratio of that with the defined reference pixel area.
182  result = numpy.abs(self.scale*exposure.getWcs().linearizePixelToSky(
183  center,
184  lsst.afw.geom.arcseconds).getLinear().computeDeterminant())
185  measRecord.set(self.jacValue, result)
186 
187  def fail(self, measRecord, error=None):
188  measRecord.set(self.jacFlag, True)
189 
190 
192  scale = lsst.pex.config.Field(dtype=float, default=5.0, optional=True,
193  doc="Scale factor to apply to shape for aperture")
194  mask = lsst.pex.config.ListField(doc="Mask planes to ignore", dtype=str,
195  default=["DETECTED", "DETECTED_NEGATIVE", "BAD", "SAT"])
196 
197 
199  '''
200  Calculate the median variance within a Footprint scaled from the object shape so
201  the value is not terribly influenced by the object and instead represents the
202  variance in the background near the object.
203  '''
204  ConfigClass = VarianceConfig
205  FAILURE_BAD_CENTROID = 1
206  FAILURE_EMPTY_FOOTPRINT = 2
207 
208  @classmethod
210  return BasePlugin.FLUX_ORDER
211 
212  def __init__(self, config, name, schema, metadata):
213  GenericPlugin.__init__(self, config, name, schema, metadata)
214  self.varValue = schema.addField(name + '_value', type="D", doc="Variance at object position")
215  self.emptyFootprintFlag = schema.addField(name + '_flag_emptyFootprint', type="Flag",
216  doc="Set to True when the footprint has no usable pixels")
217 
218  # Alias the badCentroid flag to that which is defined for the target of the centroid slot.
219  # We do not simply rely on the alias because that could be changed post-measurement.
220  schema.getAliasMap().set(name + '_flag_badCentroid', schema.getAliasMap().apply("slot_Centroid_flag"))
221 
222  def measure(self, measRecord, exposure, center):
223  # Create an aperture and grow it by scale value defined in config to ensure there are enough
224  # pixels around the object to get decent statistics
225  if not numpy.all(numpy.isfinite(measRecord.getCentroid())):
226  raise MeasurementError("Bad centroid and/or shape", self.FAILURE_BAD_CENTROID)
227  aperture = lsst.afw.geom.Ellipse(measRecord.getShape(), measRecord.getCentroid())
228  aperture.scale(self.config.scale)
229  ellipse = lsst.afw.geom.SpanSet.fromShape(aperture)
230  foot = lsst.afw.detection.Footprint(ellipse)
231  foot.clipTo(exposure.getBBox(lsst.afw.image.PARENT))
232  # Filter out any pixels which have mask bits set corresponding to the planes to be excluded
233  # (defined in config.mask)
234  maskedImage = exposure.getMaskedImage()
235  pixels = lsst.afw.detection.makeHeavyFootprint(foot, maskedImage)
236  maskBits = maskedImage.getMask().getPlaneBitMask(self.config.mask)
237  logicalMask = numpy.logical_not(pixels.getMaskArray() & maskBits)
238  # Compute the median variance value for each pixel not excluded by the mask and write the record.
239  # Numpy median is used here instead of afw.math makeStatistics because of an issue with data types
240  # being passed into the C++ layer (DM-2379).
241  if numpy.any(logicalMask):
242  medVar = numpy.median(pixels.getVarianceArray()[logicalMask])
243  measRecord.set(self.varValue, medVar)
244  else:
245  raise MeasurementError("Footprint empty, or all pixels are masked, can't compute median",
247 
248  def fail(self, measRecord, error=None):
249  # Check that we have a error object and that it is of type MeasurementError
250  if isinstance(error, MeasurementError):
251  assert error.getFlagBit() in (self.FAILURE_BAD_CENTROID, self.FAILURE_EMPTY_FOOTPRINT)
252  # FAILURE_BAD_CENTROID handled by alias to centroid record.
253  if error.getFlagBit() == self.FAILURE_EMPTY_FOOTPRINT:
254  measRecord.set(self.emptyFootprintFlag, True)
255  measRecord.set(self.varValue, numpy.nan)
256  GenericPlugin.fail(self, measRecord, error)
257 
258 
259 SingleFrameVariancePlugin = VariancePlugin.makeSingleFramePlugin("base_Variance")
260 ForcedVariancePlugin = VariancePlugin.makeForcedPlugin("base_Variance")
261 
262 
264  pass
265 
266 
267 class InputCountPlugin(GenericPlugin):
268  """
269  Plugin to count how many input images contributed to each source. This information
270  is in the exposure's coaddInputs. Some limitations:
271  * This is only for the pixel containing the center, not for all the pixels in the
272  Footprint
273  * This does not account for any clipping in the coadd
274  """
275 
276  ConfigClass = InputCountConfig
277  FAILURE_BAD_CENTROID = 1
278  FAILURE_NO_INPUTS = 2
279 
280  @classmethod
282  return BasePlugin.SHAPE_ORDER
283 
284  def __init__(self, config, name, schema, metadata):
285  GenericPlugin.__init__(self, config, name, schema, metadata)
286  self.numberKey = schema.addField(name + '_value', type="I",
287  doc="Number of images contributing at center, not including any"
288  "clipping")
289  self.noInputsFlag = schema.addField(name + '_flag_noInputs', type="Flag",
290  doc="No coadd inputs available")
291  # Alias the badCentroid flag to that which is defined for the target of the centroid slot.
292  # We do not simply rely on the alias because that could be changed post-measurement.
293  schema.getAliasMap().set(name + '_flag_badCentroid', schema.getAliasMap().apply("slot_Centroid_flag"))
294 
295  def measure(self, measRecord, exposure, center):
296  if not exposure.getInfo().getCoaddInputs():
297  raise MeasurementError("No coadd inputs defined.", self.FAILURE_NO_INPUTS)
298  if not numpy.all(numpy.isfinite(center)):
299  raise MeasurementError("Source has a bad centroid.", self.FAILURE_BAD_CENTROID)
300 
301  ccds = exposure.getInfo().getCoaddInputs().ccds
302  measRecord.set(self.numberKey, len(ccds.subsetContaining(center, exposure.getWcs())))
303 
304  def fail(self, measRecord, error=None):
305  if error is not None:
306  assert error.getFlagBit() in (self.FAILURE_BAD_CENTROID, self.FAILURE_NO_INPUTS)
307  # FAILURE_BAD_CENTROID handled by alias to centroid record.
308  if error.getFlagBit() == self.FAILURE_NO_INPUTS:
309  measRecord.set(self.noInputsFlag, True)
310  GenericPlugin.fail(self, measRecord, error)
311 
312 
313 SingleFrameInputCountPlugin = InputCountPlugin.makeSingleFramePlugin("base_InputCount")
314 ForcedInputCountPlugin = InputCountPlugin.makeForcedPlugin("base_InputCount")
315 
316 
318  pass
319 
320 
321 @register("base_PeakCentroid")
323  """
324  A centroid algorithm that simply uses the first (i.e. highest) Peak in the Source's
325  Footprint as the centroid. This is of course a relatively poor measure of the true
326  centroid of the object; this algorithm is provided mostly for testing and debugging.
327  """
328 
329  ConfigClass = SingleFramePeakCentroidConfig
330 
331  @classmethod
333  return cls.CENTROID_ORDER
334 
335  def __init__(self, config, name, schema, metadata):
336  SingleFramePlugin.__init__(self, config, name, schema, metadata)
337  self.keyX = schema.addField(name + "_x", type="D", doc="peak centroid", units="pixel")
338  self.keyY = schema.addField(name + "_y", type="D", doc="peak centroid", units="pixel")
339  self.flag = schema.addField(name + "_flag", type="Flag", doc="Centroiding failed")
340 
341  def measure(self, measRecord, exposure):
342  peak = measRecord.getFootprint().getPeaks()[0]
343  measRecord.set(self.keyX, peak.getFx())
344  measRecord.set(self.keyY, peak.getFy())
345 
346  def fail(self, measRecord, error=None):
347  measRecord.set(self.flag, True)
348 
349  @staticmethod
351  return SimpleCentroidTransform
352 
353 
355  pass
356 
357 
358 @register("base_SkyCoord")
360  """
361  A measurement plugin that sets the "coord" field (part of the Source minimal schema)
362  using the slot centroid and the Wcs attached to the Exposure.
363  """
364 
365  ConfigClass = SingleFrameSkyCoordConfig
366 
367  @classmethod
369  return cls.SHAPE_ORDER
370 
371  def measure(self, measRecord, exposure):
372  # there should be a base class method for handling this exception. Put this on a later ticket
373  # Also, there should be a python Exception of the appropriate type for this error
374  if not exposure.hasWcs():
375  raise Exception("Wcs not attached to exposure. Required for " + self.name + " algorithm")
376  measRecord.updateCoord(exposure.getWcs())
377 
378  def fail(self, measRecord, error=None):
379  # Override fail() to do nothing in the case of an exception: this is not ideal,
380  # but we don't have a place to put failures because we don't allocate any fields.
381  # Should consider fixing as part of DM-1011
382  pass
383 
384 
385 # --- Forced Plugins ---
386 
387 class ForcedPeakCentroidConfig(ForcedPluginConfig):
388  pass
389 
390 
391 @register("base_PeakCentroid")
393  """
394  The forced peak centroid is like the SFM peak centroid plugin, except that it must transform
395  the peak coordinate from the original (reference) coordinate system to the coordinate system
396  of the exposure being measured.
397  """
398 
399  ConfigClass = ForcedPeakCentroidConfig
400 
401  @classmethod
403  return cls.CENTROID_ORDER
404 
405  def __init__(self, config, name, schemaMapper, metadata):
406  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
407  schema = schemaMapper.editOutputSchema()
408  self.keyX = schema.addField(name + "_x", type="D", doc="peak centroid", units="pixel")
409  self.keyY = schema.addField(name + "_y", type="D", doc="peak centroid", units="pixel")
410 
411  def measure(self, measRecord, exposure, refRecord, refWcs):
412  targetWcs = exposure.getWcs()
413  peak = refRecord.getFootprint().getPeaks()[0]
414  result = lsst.afw.geom.Point2D(peak.getFx(), peak.getFy())
415  result = targetWcs.skyToPixel(refWcs.pixelToSky(result))
416  measRecord.set(self.keyX, result.getX())
417  measRecord.set(self.keyY, result.getY())
418 
419  @staticmethod
421  return SimpleCentroidTransform
422 
423 
425  pass
426 
427 
428 @register("base_TransformedCentroid")
430  """A centroid pseudo-algorithm for forced measurement that simply transforms the centroid
431  from the reference catalog to the measurement coordinate system. This is used as
432  the slot centroid by default in forced measurement, allowing subsequent measurements
433  to simply refer to the slot value just as they would in single-frame measurement.
434  """
435 
436  ConfigClass = ForcedTransformedCentroidConfig
437 
438  @classmethod
440  return cls.CENTROID_ORDER
441 
442  def __init__(self, config, name, schemaMapper, metadata):
443  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
444  schema = schemaMapper.editOutputSchema()
445  # Allocate x and y fields, join these into a single FunctorKey for ease-of-use.
446  xKey = schema.addField(name + "_x", type="D", doc="transformed reference centroid column",
447  units="pixel")
448  yKey = schema.addField(name + "_y", type="D", doc="transformed reference centroid row",
449  units="pixel")
451  # Because we're taking the reference position as given, we don't bother transforming its
452  # uncertainty and reporting that here, so there are no sigma or cov fields. We do propagate
453  # the flag field, if it exists.
454  if "slot_Centroid_flag" in schemaMapper.getInputSchema():
455  self.flagKey = schema.addField(name + "_flag", type="Flag",
456  doc="whether the reference centroid is marked as bad")
457  else:
458  self.flagKey = None
459 
460  def measure(self, measRecord, exposure, refRecord, refWcs):
461  targetWcs = exposure.getWcs()
462  if not refWcs == targetWcs:
463  targetPos = targetWcs.skyToPixel(refWcs.pixelToSky(refRecord.getCentroid()))
464  measRecord.set(self.centroidKey, targetPos)
465  else:
466  measRecord.set(self.centroidKey, refRecord.getCentroid())
467  if self.flagKey is not None:
468  measRecord.set(self.flagKey, refRecord.getCentroidFlag())
469 
470 
472  pass
473 
474 
475 @register("base_TransformedShape")
477  """A shape pseudo-algorithm for forced measurement that simply transforms the shape
478  from the reference catalog to the measurement coordinate system. This is used as
479  the slot shape by default in forced measurement, allowing subsequent measurements
480  to simply refer to the slot value just as they would in single-frame measurement.
481  """
482 
483  ConfigClass = ForcedTransformedShapeConfig
484 
485  @classmethod
487  return cls.SHAPE_ORDER
488 
489  def __init__(self, config, name, schemaMapper, metadata):
490  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
491  schema = schemaMapper.editOutputSchema()
492  # Allocate xx, yy, xy fields, join these into a single FunctorKey for ease-of-use.
493  xxKey = schema.addField(name + "_xx", type="D", doc="transformed reference shape x^2 moment",
494  units="pixel^2")
495  yyKey = schema.addField(name + "_yy", type="D", doc="transformed reference shape y^2 moment",
496  units="pixel^2")
497  xyKey = schema.addField(name + "_xy", type="D", doc="transformed reference shape xy moment",
498  units="pixel^2")
499  self.shapeKey = lsst.afw.table.QuadrupoleKey(xxKey, yyKey, xyKey)
500  # Because we're taking the reference position as given, we don't bother transforming its
501  # uncertainty and reporting that here, so there are no sigma or cov fields. We do propagate
502  # the flag field, if it exists.
503  if "slot_Shape_flag" in schemaMapper.getInputSchema():
504  self.flagKey = schema.addField(name + "_flag", type="Flag",
505  doc="whether the reference shape is marked as bad")
506  else:
507  self.flagKey = None
508 
509  def measure(self, measRecord, exposure, refRecord, refWcs):
510  targetWcs = exposure.getWcs()
511  if not refWcs == targetWcs:
512  fullTransform = makeWcsPairTransform(refWcs, targetWcs)
513  localTransform = lsst.afw.geom.linearizeTransform(fullTransform, refRecord.getCentroid())
514  measRecord.set(self.shapeKey, refRecord.getShape().transform(localTransform.getLinear()))
515  else:
516  measRecord.set(self.shapeKey, refRecord.getShape())
517  if self.flagKey is not None:
518  measRecord.set(self.flagKey, refRecord.getShapeFlag())
Base config class for all measurement plugins.
def measure(self, measRecord, exposure)
Definition: plugins.py:341
static std::shared_ptr< geom::SpanSet > fromShape(int r, Stencil s=Stencil::CIRCLE, Point2I offset=Point2I())
def fail(self, measRecord, error=None)
Definition: plugins.py:378
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:131
def fail(self, measRecord, error=None)
Definition: plugins.py:346
def fail(self, measRecord, error=None)
Definition: plugins.py:187
def measure(self, measRecord, exposure, center)
Definition: plugins.py:295
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:171
def measure(self, measRecord, exposure)
Definition: plugins.py:139
Base class for configs of single-frame plugin algorithms.
Definition: sfm.py:43
AffineTransform linearizeTransform(TransformPoint2ToPoint2 const &original, Point2D const &inPoint)
def fail(self, measRecord, error=None)
Definition: plugins.py:248
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:405
Base class for single-frame plugin algorithms.
Definition: sfm.py:50
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:284
def fail(self, measRecord, error=None)
Definition: plugins.py:150
def register(name, shouldApCorr=False, apCorrList=())
A Python decorator that registers a class, using the given name, in its base class&#39;s PluginRegistry...
def measure(self, measRecord, exposure)
Definition: plugins.py:178
def measure(self, measRecord, exposure, refRecord, refWcs)
Definition: plugins.py:460
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:442
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:489
def wrapTransform(transformClass, hasLogName=False)
Definition: wrappers.py:429
def measure(self, measRecord, exposure, refRecord, refWcs)
Definition: plugins.py:411
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:335
def measure(self, measRecord, exposure)
Definition: plugins.py:371
def measure(self, measRecord, exposure, center)
Definition: plugins.py:222
def fail(self, measRecord, error=None)
Definition: plugins.py:304
def measure(self, measRecord, exposure, refRecord, refWcs)
Definition: plugins.py:509
def wrapSimpleAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False, hasLogName=False, kwds)
Wrap a C++ SimpleAlgorithm class into both a Python SingleFramePlugin and ForcedPlugin classes...
Definition: wrappers.py:358
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:212
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > makeHeavyFootprint(Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &img, HeavyFootprintCtrl const *ctrl=NULL)