lsst.meas.base  16.0-13-gd9b1b71+19
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 
28 import numpy as np
29 
31 import lsst.geom
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 .localBackground import LocalBackgroundControl, LocalBackgroundAlgorithm, LocalBackgroundTransform
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 wrapSimpleAlgorithm(LocalBackgroundAlgorithm, Control=LocalBackgroundControl,
99  TransformClass=LocalBackgroundTransform, executionOrder=BasePlugin.FLUX_ORDER)
100 
101 wrapTransform(PsfFluxTransform)
102 wrapTransform(PeakLikelihoodFluxTransform)
103 wrapTransform(GaussianFluxTransform)
104 wrapTransform(NaiveCentroidTransform)
105 wrapTransform(SdssCentroidTransform)
106 wrapTransform(SdssShapeTransform)
107 wrapTransform(ScaledApertureFluxTransform)
108 wrapTransform(ApertureFluxTransform)
109 wrapTransform(LocalBackgroundTransform)
110 
111 # --- Single-Frame Measurement Plugins ---
112 
113 
115  pass
116 
117 
118 @register("base_FPPosition")
120  '''
121  Algorithm to calculate the position of a centroid on the focal plane
122  '''
123 
124  ConfigClass = SingleFrameFPPositionConfig
125 
126  @classmethod
128  return cls.SHAPE_ORDER
129 
130  def __init__(self, config, name, schema, metadata):
131  SingleFramePlugin.__init__(self, config, name, schema, metadata)
132  self.focalValue = lsst.afw.table.Point2DKey.addFields(schema, name, "Position on the focal plane",
133  "mm")
134  self.focalFlag = schema.addField(name + "_flag", type="Flag", doc="Set to True for any fatal failure")
135  self.detectorFlag = schema.addField(name + "_missingDetector_flag", type="Flag",
136  doc="Set to True if detector object is missing")
137 
138  def measure(self, measRecord, exposure):
139  det = exposure.getDetector()
140  if not det:
141  measRecord.set(self.detectorFlag, True)
142  fp = lsst.geom.Point2D(np.nan, np.nan)
143  else:
144  center = measRecord.getCentroid()
145  fp = det.transform(center, lsst.afw.cameraGeom.PIXELS, lsst.afw.cameraGeom.FOCAL_PLANE)
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, where area is in arcsec^2
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 a source record's centroid, and take the
179  # ratio of that with the defined reference pixel area.
180  result = np.abs(self.scale*exposure.getWcs().linearizePixelToSky(
181  center,
182  lsst.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 np.all(np.isfinite(measRecord.getCentroid())):
224  raise MeasurementError("Bad centroid and/or shape", self.FAILURE_BAD_CENTROID)
225  aperture = lsst.afw.geom.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 = np.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 np.any(logicalMask):
240  medVar = np.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, np.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 np.all(np.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.geom.Point2D(peak.getFx(), peak.getFy())
413  result = targetWcs.skyToPixel(refWcs.pixelToSky(result))
414  measRecord.set(self.keyX, result.getX())
415  measRecord.set(self.keyY, result.getY())
416 
417  @staticmethod
419  return SimpleCentroidTransform
420 
421 
423  pass
424 
425 
426 @register("base_TransformedCentroid")
428  """A centroid pseudo-algorithm for forced measurement that simply transforms the centroid
429  from the reference catalog to the measurement coordinate system. This is used as
430  the slot centroid by default in forced measurement, allowing subsequent measurements
431  to simply refer to the slot value just as they would in single-frame measurement.
432  """
433 
434  ConfigClass = ForcedTransformedCentroidConfig
435 
436  @classmethod
438  return cls.CENTROID_ORDER
439 
440  def __init__(self, config, name, schemaMapper, metadata):
441  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
442  schema = schemaMapper.editOutputSchema()
443  # Allocate x and y fields, join these into a single FunctorKey for ease-of-use.
444  xKey = schema.addField(name + "_x", type="D", doc="transformed reference centroid column",
445  units="pixel")
446  yKey = schema.addField(name + "_y", type="D", doc="transformed reference centroid row",
447  units="pixel")
449  # Because we're taking the reference position as given, we don't bother transforming its
450  # uncertainty and reporting that here, so there are no sigma or cov fields. We do propagate
451  # the flag field, if it exists.
452  if "slot_Centroid_flag" in schemaMapper.getInputSchema():
453  self.flagKey = schema.addField(name + "_flag", type="Flag",
454  doc="whether the reference centroid is marked as bad")
455  else:
456  self.flagKey = None
457 
458  def measure(self, measRecord, exposure, refRecord, refWcs):
459  targetWcs = exposure.getWcs()
460  if not refWcs == targetWcs:
461  targetPos = targetWcs.skyToPixel(refWcs.pixelToSky(refRecord.getCentroid()))
462  measRecord.set(self.centroidKey, targetPos)
463  else:
464  measRecord.set(self.centroidKey, refRecord.getCentroid())
465  if self.flagKey is not None:
466  measRecord.set(self.flagKey, refRecord.getCentroidFlag())
467 
468 
470  pass
471 
472 
473 @register("base_TransformedShape")
475  """A shape pseudo-algorithm for forced measurement that simply transforms the shape
476  from the reference catalog to the measurement coordinate system. This is used as
477  the slot shape by default in forced measurement, allowing subsequent measurements
478  to simply refer to the slot value just as they would in single-frame measurement.
479  """
480 
481  ConfigClass = ForcedTransformedShapeConfig
482 
483  @classmethod
485  return cls.SHAPE_ORDER
486 
487  def __init__(self, config, name, schemaMapper, metadata):
488  ForcedPlugin.__init__(self, config, name, schemaMapper, metadata)
489  schema = schemaMapper.editOutputSchema()
490  # Allocate xx, yy, xy fields, join these into a single FunctorKey for ease-of-use.
491  xxKey = schema.addField(name + "_xx", type="D", doc="transformed reference shape x^2 moment",
492  units="pixel^2")
493  yyKey = schema.addField(name + "_yy", type="D", doc="transformed reference shape y^2 moment",
494  units="pixel^2")
495  xyKey = schema.addField(name + "_xy", type="D", doc="transformed reference shape xy moment",
496  units="pixel^2")
497  self.shapeKey = lsst.afw.table.QuadrupoleKey(xxKey, yyKey, xyKey)
498  # Because we're taking the reference position as given, we don't bother transforming its
499  # uncertainty and reporting that here, so there are no sigma or cov fields. We do propagate
500  # the flag field, if it exists.
501  if "slot_Shape_flag" in schemaMapper.getInputSchema():
502  self.flagKey = schema.addField(name + "_flag", type="Flag",
503  doc="whether the reference shape is marked as bad")
504  else:
505  self.flagKey = None
506 
507  def measure(self, measRecord, exposure, refRecord, refWcs):
508  targetWcs = exposure.getWcs()
509  if not refWcs == targetWcs:
510  fullTransform = lsst.afw.geom.makeWcsPairTransform(refWcs, targetWcs)
511  localTransform = lsst.afw.geom.linearizeTransform(fullTransform, refRecord.getCentroid())
512  measRecord.set(self.shapeKey, refRecord.getShape().transform(localTransform.getLinear()))
513  else:
514  measRecord.set(self.shapeKey, refRecord.getShape())
515  if self.flagKey is not None:
516  measRecord.set(self.flagKey, refRecord.getShapeFlag())
Base config class for all measurement plugins.
def measure(self, measRecord, exposure)
Definition: plugins.py:339
def fail(self, measRecord, error=None)
Definition: plugins.py:376
lsst::geom::AffineTransform linearizeTransform(TransformPoint2ToPoint2 const &original, lsst::geom::Point2D const &inPoint)
def __init__(self, config, name, schema, metadata)
Definition: plugins.py:130
def fail(self, measRecord, error=None)
Definition: plugins.py:344
static std::shared_ptr< geom::SpanSet > fromShape(int r, Stencil s=Stencil::CIRCLE, lsst::geom::Point2I offset=lsst::geom::Point2I())
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:138
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 measure(self, measRecord, exposure)
Definition: plugins.py:176
std::shared_ptr< TransformPoint2ToPoint2 > makeWcsPairTransform(SkyWcs const &src, SkyWcs const &dst)
def measure(self, measRecord, exposure, refRecord, refWcs)
Definition: plugins.py:458
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:440
def __init__(self, config, name, schemaMapper, metadata)
Definition: plugins.py:487
def wrapTransform(transformClass, hasLogName=False)
Definition: wrappers.py:428
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:507
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:357
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)