lsst.meas.base  14.0-22-gcfb0d17+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 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  fp = det.transform(center, lsst.afw.cameraGeom.PIXELS, lsst.afw.cameraGeom.FOCAL_PLANE)
147  measRecord.set(self.focalValue, fp)
148 
149  def fail(self, measRecord, error=None):
150  measRecord.set(self.focalFlag, True)
151 
152 
154  pixelScale = lsst.pex.config.Field(dtype=float, default=0.5, doc="Nominal pixel size (arcsec)")
155 
156 
157 @register("base_Jacobian")
159  '''
160  Algorithm which computes the Jacobian about a source and computes its ratio with a nominal pixel area.
161  This allows one to compare relative instead of absolute areas of pixels.
162  '''
163 
164  ConfigClass = SingleFrameJacobianConfig
165 
166  @classmethod
168  return cls.SHAPE_ORDER
169 
170  def __init__(self, config, name, schema, metadata):
171  SingleFramePlugin.__init__(self, config, name, schema, metadata)
172  self.jacValue = schema.addField(name + '_value', type="D", doc="Jacobian correction")
173  self.jacFlag = schema.addField(name + '_flag', type="Flag", doc="Set to 1 for any fatal failure")
174  # Calculate one over the area of a nominal reference pixel, where area is in arcsec^2
175  self.scale = pow(self.config.pixelScale, -2)
176 
177  def measure(self, measRecord, exposure):
178  center = measRecord.getCentroid()
179  # Compute the area of a pixel at a source record's centroid, and take the
180  # ratio of that with the defined reference pixel area.
181  result = numpy.abs(self.scale*exposure.getWcs().linearizePixelToSky(
182  center,
183  lsst.afw.geom.arcseconds).getLinear().computeDeterminant())
184  measRecord.set(self.jacValue, result)
185 
186  def fail(self, measRecord, error=None):
187  measRecord.set(self.jacFlag, True)
188 
189 
191  scale = lsst.pex.config.Field(dtype=float, default=5.0, optional=True,
192  doc="Scale factor to apply to shape for aperture")
193  mask = lsst.pex.config.ListField(doc="Mask planes to ignore", dtype=str,
194  default=["DETECTED", "DETECTED_NEGATIVE", "BAD", "SAT"])
195 
196 
198  '''
199  Calculate the median variance within a Footprint scaled from the object shape so
200  the value is not terribly influenced by the object and instead represents the
201  variance in the background near the object.
202  '''
203  ConfigClass = VarianceConfig
204  FAILURE_BAD_CENTROID = 1
205  FAILURE_EMPTY_FOOTPRINT = 2
206 
207  @classmethod
209  return BasePlugin.FLUX_ORDER
210 
211  def __init__(self, config, name, schema, metadata):
212  GenericPlugin.__init__(self, config, name, schema, metadata)
213  self.varValue = schema.addField(name + '_value', type="D", doc="Variance at object position")
214  self.emptyFootprintFlag = schema.addField(name + '_flag_emptyFootprint', type="Flag",
215  doc="Set to True when the footprint has no usable pixels")
216 
217  # Alias the badCentroid flag to that which is defined for the target of the centroid slot.
218  # We do not simply rely on the alias because that could be changed post-measurement.
219  schema.getAliasMap().set(name + '_flag_badCentroid', schema.getAliasMap().apply("slot_Centroid_flag"))
220 
221  def measure(self, measRecord, exposure, center):
222  # Create an aperture and grow it by scale value defined in config to ensure there are enough
223  # pixels around the object to get decent statistics
224  if not numpy.all(numpy.isfinite(measRecord.getCentroid())):
225  raise MeasurementError("Bad centroid and/or shape", self.FAILURE_BAD_CENTROID)
226  aperture = lsst.afw.geom.Ellipse(measRecord.getShape(), measRecord.getCentroid())
227  aperture.scale(self.config.scale)
228  ellipse = lsst.afw.geom.SpanSet.fromShape(aperture)
229  foot = lsst.afw.detection.Footprint(ellipse)
230  foot.clipTo(exposure.getBBox(lsst.afw.image.PARENT))
231  # Filter out any pixels which have mask bits set corresponding to the planes to be excluded
232  # (defined in config.mask)
233  maskedImage = exposure.getMaskedImage()
234  pixels = lsst.afw.detection.makeHeavyFootprint(foot, maskedImage)
235  maskBits = maskedImage.getMask().getPlaneBitMask(self.config.mask)
236  logicalMask = numpy.logical_not(pixels.getMaskArray() & maskBits)
237  # Compute the median variance value for each pixel not excluded by the mask and write the record.
238  # Numpy median is used here instead of afw.math makeStatistics because of an issue with data types
239  # being passed into the C++ layer (DM-2379).
240  if numpy.any(logicalMask):
241  medVar = numpy.median(pixels.getVarianceArray()[logicalMask])
242  measRecord.set(self.varValue, medVar)
243  else:
244  raise MeasurementError("Footprint empty, or all pixels are masked, can't compute median",
246 
247  def fail(self, measRecord, error=None):
248  # Check that we have a error object and that it is of type MeasurementError
249  if isinstance(error, MeasurementError):
250  assert error.getFlagBit() in (self.FAILURE_BAD_CENTROID, self.FAILURE_EMPTY_FOOTPRINT)
251  # FAILURE_BAD_CENTROID handled by alias to centroid record.
252  if error.getFlagBit() == self.FAILURE_EMPTY_FOOTPRINT:
253  measRecord.set(self.emptyFootprintFlag, True)
254  measRecord.set(self.varValue, numpy.nan)
255  GenericPlugin.fail(self, measRecord, error)
256 
257 
258 SingleFrameVariancePlugin = VariancePlugin.makeSingleFramePlugin("base_Variance")
259 ForcedVariancePlugin = VariancePlugin.makeForcedPlugin("base_Variance")
260 
261 
263  pass
264 
265 
266 class InputCountPlugin(GenericPlugin):
267  """
268  Plugin to count how many input images contributed to each source. This information
269  is in the exposure's coaddInputs. Some limitations:
270  * This is only for the pixel containing the center, not for all the pixels in the
271  Footprint
272  * This does not account for any clipping in the coadd
273  """
274 
275  ConfigClass = InputCountConfig
276  FAILURE_BAD_CENTROID = 1
277  FAILURE_NO_INPUTS = 2
278 
279  @classmethod
281  return BasePlugin.SHAPE_ORDER
282 
283  def __init__(self, config, name, schema, metadata):
284  GenericPlugin.__init__(self, config, name, schema, metadata)
285  self.numberKey = schema.addField(name + '_value', type="I",
286  doc="Number of images contributing at center, not including any"
287  "clipping")
288  self.noInputsFlag = schema.addField(name + '_flag_noInputs', type="Flag",
289  doc="No coadd inputs available")
290  # Alias the badCentroid flag to that which is defined for the target of the centroid slot.
291  # We do not simply rely on the alias because that could be changed post-measurement.
292  schema.getAliasMap().set(name + '_flag_badCentroid', schema.getAliasMap().apply("slot_Centroid_flag"))
293 
294  def measure(self, measRecord, exposure, center):
295  if not exposure.getInfo().getCoaddInputs():
296  raise MeasurementError("No coadd inputs defined.", self.FAILURE_NO_INPUTS)
297  if not numpy.all(numpy.isfinite(center)):
298  raise MeasurementError("Source has a bad centroid.", self.FAILURE_BAD_CENTROID)
299 
300  ccds = exposure.getInfo().getCoaddInputs().ccds
301  measRecord.set(self.numberKey, len(ccds.subsetContaining(center, exposure.getWcs())))
302 
303  def fail(self, measRecord, error=None):
304  if error is not None:
305  assert error.getFlagBit() in (self.FAILURE_BAD_CENTROID, self.FAILURE_NO_INPUTS)
306  # FAILURE_BAD_CENTROID handled by alias to centroid record.
307  if error.getFlagBit() == self.FAILURE_NO_INPUTS:
308  measRecord.set(self.noInputsFlag, True)
309  GenericPlugin.fail(self, measRecord, error)
310 
311 
312 SingleFrameInputCountPlugin = InputCountPlugin.makeSingleFramePlugin("base_InputCount")
313 ForcedInputCountPlugin = InputCountPlugin.makeForcedPlugin("base_InputCount")
314 
315 
317  pass
318 
319 
320 @register("base_PeakCentroid")
322  """
323  A centroid algorithm that simply uses the first (i.e. highest) Peak in the Source's
324  Footprint as the centroid. This is of course a relatively poor measure of the true
325  centroid of the object; this algorithm is provided mostly for testing and debugging.
326  """
327 
328  ConfigClass = SingleFramePeakCentroidConfig
329 
330  @classmethod
332  return cls.CENTROID_ORDER
333 
334  def __init__(self, config, name, schema, metadata):
335  SingleFramePlugin.__init__(self, config, name, schema, metadata)
336  self.keyX = schema.addField(name + "_x", type="D", doc="peak centroid", units="pixel")
337  self.keyY = schema.addField(name + "_y", type="D", doc="peak centroid", units="pixel")
338  self.flag = schema.addField(name + "_flag", type="Flag", doc="Centroiding failed")
339 
340  def measure(self, measRecord, exposure):
341  peak = measRecord.getFootprint().getPeaks()[0]
342  measRecord.set(self.keyX, peak.getFx())
343  measRecord.set(self.keyY, peak.getFy())
344 
345  def fail(self, measRecord, error=None):
346  measRecord.set(self.flag, True)
347 
348  @staticmethod
350  return SimpleCentroidTransform
351 
352 
354  pass
355 
356 
357 @register("base_SkyCoord")
359  """
360  A measurement plugin that sets the "coord" field (part of the Source minimal schema)
361  using the slot centroid and the Wcs attached to the Exposure.
362  """
363 
364  ConfigClass = SingleFrameSkyCoordConfig
365 
366  @classmethod
368  return cls.SHAPE_ORDER
369 
370  def measure(self, measRecord, exposure):
371  # there should be a base class method for handling this exception. Put this on a later ticket
372  # Also, there should be a python Exception of the appropriate type for this error
373  if not exposure.hasWcs():
374  raise Exception("Wcs not attached to exposure. Required for " + self.name + " algorithm")
375  measRecord.updateCoord(exposure.getWcs())
376 
377  def fail(self, measRecord, error=None):
378  # Override fail() to do nothing in the case of an exception: this is not ideal,
379  # but we don't have a place to put failures because we don't allocate any fields.
380  # Should consider fixing as part of DM-1011
381  pass
382 
383 
384 # --- Forced Plugins ---
385 
386 class ForcedPeakCentroidConfig(ForcedPluginConfig):
387  pass
388 
389 
390 @register("base_PeakCentroid")
392  """
393  The forced peak centroid is like the SFM peak centroid plugin, except that it must transform
394  the peak coordinate from the original (reference) coordinate system to the coordinate system
395  of the exposure being measured.
396  """
397 
398  ConfigClass = ForcedPeakCentroidConfig
399 
400  @classmethod
402  return cls.CENTROID_ORDER
403 
404  def __init__(self, config, name, schemaMapper, metadata):
405  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
406  schema = schemaMapper.editOutputSchema()
407  self.keyX = schema.addField(name + "_x", type="D", doc="peak centroid", units="pixel")
408  self.keyY = schema.addField(name + "_y", type="D", doc="peak centroid", units="pixel")
409 
410  def measure(self, measRecord, exposure, refRecord, refWcs):
411  targetWcs = exposure.getWcs()
412  peak = refRecord.getFootprint().getPeaks()[0]
413  result = lsst.afw.geom.Point2D(peak.getFx(), peak.getFy())
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 = makeWcsPairTransform(refWcs, targetWcs)
512  localTransform = lsst.afw.geom.linearizeTransform(fullTransform, 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:340
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:377
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:131
def fail(self, measRecord, error=None)
Definition: plugins.py:345
def fail(self, measRecord, error=None)
Definition: plugins.py:186
def measure(self, measRecord, exposure, center)
Definition: plugins.py:294
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:170
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:247
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:404
Base class for single-frame plugin algorithms.
Definition: sfm.py:50
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:283
def fail(self, measRecord, error=None)
Definition: plugins.py:149
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:177
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:410
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:334
def measure(self, measRecord, exposure)
Definition: plugins.py:370
def measure(self, measRecord, exposure, center)
Definition: plugins.py:221
def fail(self, measRecord, error=None)
Definition: plugins.py:303
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:211
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > makeHeavyFootprint(Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &img, HeavyFootprintCtrl const *ctrl=NULL)