lsst.meas.base  14.0-17-g4f4ea82+2
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 
35 from .pluginRegistry import register
36 from .pluginsBase import BasePlugin
37 from .baseMeasurement import BaseMeasurementPluginConfig
38 from .sfm import SingleFramePluginConfig, SingleFramePlugin
39 from .forcedMeasurement import ForcedPluginConfig, ForcedPlugin
40 from .wrappers import wrapSimpleAlgorithm, wrapTransform, GenericPlugin
41 from .transforms import SimpleCentroidTransform
42 
43 from .apertureFlux import ApertureFluxControl, ApertureFluxTransform
44 from .transform import BaseTransform
45 from .blendedness import BlendednessAlgorithm, BlendednessControl
46 from .circularApertureFlux import CircularApertureFluxAlgorithm
47 from .gaussianFlux import GaussianFluxAlgorithm, GaussianFluxControl, GaussianFluxTransform
48 from .exceptions import MeasurementError
49 from .naiveCentroid import NaiveCentroidAlgorithm, NaiveCentroidControl, NaiveCentroidTransform
50 from .peakLikelihoodFlux import PeakLikelihoodFluxAlgorithm, PeakLikelihoodFluxControl, \
51  PeakLikelihoodFluxTransform
52 from .pixelFlags import PixelFlagsAlgorithm, PixelFlagsControl
53 from .psfFlux import PsfFluxAlgorithm, PsfFluxControl, PsfFluxTransform
54 from .scaledApertureFlux import ScaledApertureFluxAlgorithm, ScaledApertureFluxControl, \
55  ScaledApertureFluxTransform
56 from .sdssCentroid import SdssCentroidAlgorithm, SdssCentroidControl, SdssCentroidTransform
57 from .sdssShape import SdssShapeAlgorithm, SdssShapeControl, SdssShapeTransform
58 
59 __all__ = (
60  "SingleFrameFPPositionConfig", "SingleFrameFPPositionPlugin",
61  "SingleFrameJacobianConfig", "SingleFrameJacobianPlugin",
62  "VarianceConfig", "SingleFrameVariancePlugin", "ForcedVariancePlugin",
63  "InputCountConfig", "SingleFrameInputCountPlugin", "ForcedInputCountPlugin",
64  "SingleFramePeakCentroidConfig", "SingleFramePeakCentroidPlugin",
65  "SingleFrameSkyCoordConfig", "SingleFrameSkyCoordPlugin",
66  "ForcedPeakCentroidConfig", "ForcedPeakCentroidPlugin",
67  "ForcedTransformedCentroidConfig", "ForcedTransformedCentroidPlugin",
68  "ForcedTransformedShapeConfig", "ForcedTransformedShapePlugin",
69 )
70 
71 # --- Wrapped C++ Plugins ---
72 
73 wrapSimpleAlgorithm(PsfFluxAlgorithm, Control=PsfFluxControl,
74  TransformClass=PsfFluxTransform, executionOrder=BasePlugin.FLUX_ORDER,
75  shouldApCorr=True, hasLogName=True)
76 wrapSimpleAlgorithm(PeakLikelihoodFluxAlgorithm, Control=PeakLikelihoodFluxControl,
77  TransformClass=PeakLikelihoodFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)
78 wrapSimpleAlgorithm(GaussianFluxAlgorithm, Control=GaussianFluxControl,
79  TransformClass=GaussianFluxTransform, executionOrder=BasePlugin.FLUX_ORDER,
80  shouldApCorr=True)
81 wrapSimpleAlgorithm(NaiveCentroidAlgorithm, Control=NaiveCentroidControl,
82  TransformClass=NaiveCentroidTransform, executionOrder=BasePlugin.CENTROID_ORDER)
83 wrapSimpleAlgorithm(SdssCentroidAlgorithm, Control=SdssCentroidControl,
84  TransformClass=SdssCentroidTransform, executionOrder=BasePlugin.CENTROID_ORDER)
85 wrapSimpleAlgorithm(PixelFlagsAlgorithm, Control=PixelFlagsControl,
86  executionOrder=BasePlugin.FLUX_ORDER)
87 wrapSimpleAlgorithm(SdssShapeAlgorithm, Control=SdssShapeControl,
88  TransformClass=SdssShapeTransform, executionOrder=BasePlugin.SHAPE_ORDER)
89 wrapSimpleAlgorithm(ScaledApertureFluxAlgorithm, Control=ScaledApertureFluxControl,
90  TransformClass=ScaledApertureFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)
91 
92 wrapSimpleAlgorithm(CircularApertureFluxAlgorithm, needsMetadata=True, Control=ApertureFluxControl,
93  TransformClass=ApertureFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)
94 wrapSimpleAlgorithm(BlendednessAlgorithm, Control=BlendednessControl,
95  TransformClass=BaseTransform, executionOrder=BasePlugin.SHAPE_ORDER)
96 
97 wrapTransform(PsfFluxTransform)
98 wrapTransform(PeakLikelihoodFluxTransform)
99 wrapTransform(GaussianFluxTransform)
100 wrapTransform(NaiveCentroidTransform)
101 wrapTransform(SdssCentroidTransform)
102 wrapTransform(SdssShapeTransform)
103 wrapTransform(ScaledApertureFluxTransform)
104 wrapTransform(ApertureFluxTransform)
105 
106 # --- Single-Frame Measurement Plugins ---
107 
108 
110  pass
111 
112 
113 @register("base_FPPosition")
115  '''
116  Algorithm to calculate the position of a centroid on the focal plane
117  '''
118 
119  ConfigClass = SingleFrameFPPositionConfig
120 
121  @classmethod
123  return cls.SHAPE_ORDER
124 
125  def __init__(self, config, name, schema, metadata):
126  SingleFramePlugin.__init__(self, config, name, schema, metadata)
127  self.focalValue = lsst.afw.table.Point2DKey.addFields(schema, name, "Position on the focal plane",
128  "mm")
129  self.focalFlag = schema.addField(name + "_flag", type="Flag", doc="Set to True for any fatal failure")
130  self.detectorFlag = schema.addField(name + "_missingDetector_flag", type="Flag",
131  doc="Set to True if detector object is missing")
132 
133  def measure(self, measRecord, exposure):
134  det = exposure.getDetector()
135  if not det:
136  measRecord.set(self.detectorFlag, True)
137  fp = lsst.afw.geom.Point2D(numpy.nan, numpy.nan)
138  else:
139  center = measRecord.getCentroid()
140  posInPix = det.makeCameraPoint(center, lsst.afw.cameraGeom.PIXELS)
141  fp = det.transform(posInPix, lsst.afw.cameraGeom.FOCAL_PLANE).getPoint()
142  measRecord.set(self.focalValue, fp)
143 
144  def fail(self, measRecord, error=None):
145  measRecord.set(self.focalFlag, True)
146 
147 
149  pixelScale = lsst.pex.config.Field(dtype=float, default=0.5, doc="Nominal pixel size (arcsec)")
150 
151 
152 @register("base_Jacobian")
154  '''
155  Algorithm which computes the Jacobian about a source and computes its ratio with a nominal pixel area.
156  This allows one to compare relative instead of absolute areas of pixels.
157  '''
158 
159  ConfigClass = SingleFrameJacobianConfig
160 
161  @classmethod
163  return cls.SHAPE_ORDER
164 
165  def __init__(self, config, name, schema, metadata):
166  SingleFramePlugin.__init__(self, config, name, schema, metadata)
167  self.jacValue = schema.addField(name + '_value', type="D", doc="Jacobian correction")
168  self.jacFlag = schema.addField(name + '_flag', type="Flag", doc="Set to 1 for any fatal failure")
169  # Calculate one over the area of a nominal reference pixel
170  self.scale = pow(self.config.pixelScale, -2)
171 
172  def measure(self, measRecord, exposure):
173  center = measRecord.getCentroid()
174  # Compute the area of a pixel at the center of a source records centroid, and take the
175  # ratio of that with the defined reference pixel area.
176  result = numpy.abs(self.scale*exposure.getWcs().linearizePixelToSky(
177  center,
178  lsst.afw.geom.arcseconds).getLinear().computeDeterminant())
179  measRecord.set(self.jacValue, result)
180 
181  def fail(self, measRecord, error=None):
182  measRecord.set(self.jacFlag, True)
183 
184 
186  scale = lsst.pex.config.Field(dtype=float, default=5.0, optional=True,
187  doc="Scale factor to apply to shape for aperture")
188  mask = lsst.pex.config.ListField(doc="Mask planes to ignore", dtype=str,
189  default=["DETECTED", "DETECTED_NEGATIVE", "BAD", "SAT"])
190 
191 
193  '''
194  Calculate the median variance within a Footprint scaled from the object shape so
195  the value is not terribly influenced by the object and instead represents the
196  variance in the background near the object.
197  '''
198  ConfigClass = VarianceConfig
199  FAILURE_BAD_CENTROID = 1
200  FAILURE_EMPTY_FOOTPRINT = 2
201 
202  @classmethod
204  return BasePlugin.FLUX_ORDER
205 
206  def __init__(self, config, name, schema, metadata):
207  GenericPlugin.__init__(self, config, name, schema, metadata)
208  self.varValue = schema.addField(name + '_value', type="D", doc="Variance at object position")
209  self.emptyFootprintFlag = schema.addField(name + '_flag_emptyFootprint', type="Flag",
210  doc="Set to True when the footprint has no usable pixels")
211 
212  # Alias the badCentroid flag to that which is defined for the target of the centroid slot.
213  # We do not simply rely on the alias because that could be changed post-measurement.
214  schema.getAliasMap().set(name + '_flag_badCentroid', schema.getAliasMap().apply("slot_Centroid_flag"))
215 
216  def measure(self, measRecord, exposure, center):
217  # Create an aperture and grow it by scale value defined in config to ensure there are enough
218  # pixels around the object to get decent statistics
219  if not numpy.all(numpy.isfinite(measRecord.getCentroid())):
220  raise MeasurementError("Bad centroid and/or shape", self.FAILURE_BAD_CENTROID)
221  aperture = lsst.afw.geom.ellipses.Ellipse(measRecord.getShape(), measRecord.getCentroid())
222  aperture.scale(self.config.scale)
223  ellipse = lsst.afw.geom.SpanSet.fromShape(aperture)
224  foot = lsst.afw.detection.Footprint(ellipse)
225  foot.clipTo(exposure.getBBox(lsst.afw.image.PARENT))
226  # Filter out any pixels which have mask bits set corresponding to the planes to be excluded
227  # (defined in config.mask)
228  maskedImage = exposure.getMaskedImage()
229  pixels = lsst.afw.detection.makeHeavyFootprint(foot, maskedImage)
230  maskBits = maskedImage.getMask().getPlaneBitMask(self.config.mask)
231  logicalMask = numpy.logical_not(pixels.getMaskArray() & maskBits)
232  # Compute the median variance value for each pixel not excluded by the mask and write the record.
233  # Numpy median is used here instead of afw.math makeStatistics because of an issue with data types
234  # being passed into the C++ layer (DM-2379).
235  if numpy.any(logicalMask):
236  medVar = numpy.median(pixels.getVarianceArray()[logicalMask])
237  measRecord.set(self.varValue, medVar)
238  else:
239  raise MeasurementError("Footprint empty, or all pixels are masked, can't compute median",
241 
242  def fail(self, measRecord, error=None):
243  # Check that we have a error object and that it is of type MeasurementError
244  if isinstance(error, MeasurementError):
245  assert error.getFlagBit() in (self.FAILURE_BAD_CENTROID, self.FAILURE_EMPTY_FOOTPRINT)
246  # FAILURE_BAD_CENTROID handled by alias to centroid record.
247  if error.getFlagBit() == self.FAILURE_EMPTY_FOOTPRINT:
248  measRecord.set(self.emptyFootprintFlag, True)
249  measRecord.set(self.varValue, numpy.nan)
250  GenericPlugin.fail(self, measRecord, error)
251 
252 
253 SingleFrameVariancePlugin = VariancePlugin.makeSingleFramePlugin("base_Variance")
254 ForcedVariancePlugin = VariancePlugin.makeForcedPlugin("base_Variance")
255 
256 
258  pass
259 
260 
261 class InputCountPlugin(GenericPlugin):
262  """
263  Plugin to count how many input images contributed to each source. This information
264  is in the exposure's coaddInputs. Some limitations:
265  * This is only for the pixel containing the center, not for all the pixels in the
266  Footprint
267  * This does not account for any clipping in the coadd
268  """
269 
270  ConfigClass = InputCountConfig
271  FAILURE_BAD_CENTROID = 1
272  FAILURE_NO_INPUTS = 2
273 
274  @classmethod
276  return BasePlugin.SHAPE_ORDER
277 
278  def __init__(self, config, name, schema, metadata):
279  GenericPlugin.__init__(self, config, name, schema, metadata)
280  self.numberKey = schema.addField(name + '_value', type="I",
281  doc="Number of images contributing at center, not including any"
282  "clipping")
283  self.noInputsFlag = schema.addField(name + '_flag_noInputs', type="Flag",
284  doc="No coadd inputs available")
285  # Alias the badCentroid flag to that which is defined for the target of the centroid slot.
286  # We do not simply rely on the alias because that could be changed post-measurement.
287  schema.getAliasMap().set(name + '_flag_badCentroid', schema.getAliasMap().apply("slot_Centroid_flag"))
288 
289  def measure(self, measRecord, exposure, center):
290  if not exposure.getInfo().getCoaddInputs():
291  raise MeasurementError("No coadd inputs defined.", self.FAILURE_NO_INPUTS)
292  if not numpy.all(numpy.isfinite(center)):
293  raise MeasurementError("Source has a bad centroid.", self.FAILURE_BAD_CENTROID)
294 
295  ccds = exposure.getInfo().getCoaddInputs().ccds
296  measRecord.set(self.numberKey, len(ccds.subsetContaining(center, exposure.getWcs())))
297 
298  def fail(self, measRecord, error=None):
299  if error is not None:
300  assert error.getFlagBit() in (self.FAILURE_BAD_CENTROID, self.FAILURE_NO_INPUTS)
301  # FAILURE_BAD_CENTROID handled by alias to centroid record.
302  if error.getFlagBit() == self.FAILURE_NO_INPUTS:
303  measRecord.set(self.noInputsFlag, True)
304  GenericPlugin.fail(self, measRecord, error)
305 
306 
307 SingleFrameInputCountPlugin = InputCountPlugin.makeSingleFramePlugin("base_InputCount")
308 ForcedInputCountPlugin = InputCountPlugin.makeForcedPlugin("base_InputCount")
309 
310 
312  pass
313 
314 
315 @register("base_PeakCentroid")
317  """
318  A centroid algorithm that simply uses the first (i.e. highest) Peak in the Source's
319  Footprint as the centroid. This is of course a relatively poor measure of the true
320  centroid of the object; this algorithm is provided mostly for testing and debugging.
321  """
322 
323  ConfigClass = SingleFramePeakCentroidConfig
324 
325  @classmethod
327  return cls.CENTROID_ORDER
328 
329  def __init__(self, config, name, schema, metadata):
330  SingleFramePlugin.__init__(self, config, name, schema, metadata)
331  self.keyX = schema.addField(name + "_x", type="D", doc="peak centroid", units="pixel")
332  self.keyY = schema.addField(name + "_y", type="D", doc="peak centroid", units="pixel")
333  self.flag = schema.addField(name + "_flag", type="Flag", doc="Centroiding failed")
334 
335  def measure(self, measRecord, exposure):
336  peak = measRecord.getFootprint().getPeaks()[0]
337  measRecord.set(self.keyX, peak.getFx())
338  measRecord.set(self.keyY, peak.getFy())
339 
340  def fail(self, measRecord, error=None):
341  measRecord.set(self.flag, True)
342 
343  @staticmethod
345  return SimpleCentroidTransform
346 
347 
349  pass
350 
351 
352 @register("base_SkyCoord")
354  """
355  A measurement plugin that sets the "coord" field (part of the Source minimal schema)
356  using the slot centroid and the Wcs attached to the Exposure.
357  """
358 
359  ConfigClass = SingleFrameSkyCoordConfig
360 
361  @classmethod
363  return cls.SHAPE_ORDER
364 
365  def measure(self, measRecord, exposure):
366  # there should be a base class method for handling this exception. Put this on a later ticket
367  # Also, there should be a python Exception of the appropriate type for this error
368  if not exposure.hasWcs():
369  raise Exception("Wcs not attached to exposure. Required for " + self.name + " algorithm")
370  measRecord.updateCoord(exposure.getWcs())
371 
372  def fail(self, measRecord, error=None):
373  # Override fail() to do nothing in the case of an exception: this is not ideal,
374  # but we don't have a place to put failures because we don't allocate any fields.
375  # Should consider fixing as part of DM-1011
376  pass
377 
378 
379 # --- Forced Plugins ---
380 
381 class ForcedPeakCentroidConfig(ForcedPluginConfig):
382  pass
383 
384 
385 @register("base_PeakCentroid")
387  """
388  The forced peak centroid is like the SFM peak centroid plugin, except that it must transform
389  the peak coordinate from the original (reference) coordinate system to the coordinate system
390  of the exposure being measured.
391  """
392 
393  ConfigClass = ForcedPeakCentroidConfig
394 
395  @classmethod
397  return cls.CENTROID_ORDER
398 
399  def __init__(self, config, name, schemaMapper, metadata):
400  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
401  schema = schemaMapper.editOutputSchema()
402  self.keyX = schema.addField(name + "_x", type="D", doc="peak centroid", units="pixel")
403  self.keyY = schema.addField(name + "_y", type="D", doc="peak centroid", units="pixel")
404 
405  def measure(self, measRecord, exposure, refRecord, refWcs):
406  targetWcs = exposure.getWcs()
407  peak = refRecord.getFootprint().getPeaks()[0]
408  result = lsst.afw.geom.Point2D(peak.getFx(), peak.getFy())
409  if not refWcs == targetWcs:
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 = lsst.afw.image.XYTransformFromWcsPair(targetWcs, refWcs)
508  localTransform = fullTransform.linearizeForwardTransform(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:335
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:372
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:125
def fail(self, measRecord, error=None)
Definition: plugins.py:340
def fail(self, measRecord, error=None)
Definition: plugins.py:181
def measure(self, measRecord, exposure, center)
Definition: plugins.py:289
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:165
def measure(self, measRecord, exposure)
Definition: plugins.py:133
Base class for configs of single-frame plugin algorithms.
Definition: sfm.py:43
def fail(self, measRecord, error=None)
Definition: plugins.py:242
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:399
Base class for single-frame plugin algorithms.
Definition: sfm.py:50
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:278
def fail(self, measRecord, error=None)
Definition: plugins.py:144
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:172
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:405
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:329
def measure(self, measRecord, exposure)
Definition: plugins.py:365
def measure(self, measRecord, exposure, center)
Definition: plugins.py:216
def fail(self, measRecord, error=None)
Definition: plugins.py:298
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:206
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > makeHeavyFootprint(Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &img, HeavyFootprintCtrl const *ctrl=NULL)