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