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