LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
Classes | Functions | Variables
lsst.meas.base.base Namespace Reference

Classes

class  PluginRegistry
 Base class for plugin registries. More...
 
class  PluginMap
 Map of plugins to be run for a task. More...
 
class  BasePluginConfig
 Base class measurement Plugin config classes. More...
 
class  BasePlugin
 Base class for measurement plugins. More...
 
class  SourceSlotConfig
 Slot configuration which assigns a particular named plugin to each of a set of slots. More...
 
class  BaseMeasurementConfig
 Base config class for all measurement driver tasks. More...
 
class  BaseMeasurementTask
 Ultimate base class for all measurement tasks. More...
 

Functions

def generateAlgorithmName
 
def register
 A Python decorator that registers a class, using the given name, in its base class's PluginRegistry. More...
 

Variables

tuple FATAL_EXCEPTIONS = (MemoryError, FatalAlgorithmError)
 

Function Documentation

def lsst.meas.base.base.generateAlgorithmName (   AlgClass)
Generate a string name for an algorithm class that strips away terms that are generally redundant
while (hopefully) remaining easy to trace to the code.

The returned name will cobmine the package name, with any "lsst" and/or "meas" prefix removed,
with the class name, with any "Algorithm" suffix removed.  For instance,
lsst.meas.base.SdssShapeAlgorithm becomes "base_SdssShape".

Definition at line 42 of file base.py.

42 
43 def generateAlgorithmName(AlgClass):
44  """Generate a string name for an algorithm class that strips away terms that are generally redundant
45  while (hopefully) remaining easy to trace to the code.
46 
47  The returned name will cobmine the package name, with any "lsst" and/or "meas" prefix removed,
48  with the class name, with any "Algorithm" suffix removed. For instance,
49  lsst.meas.base.SdssShapeAlgorithm becomes "base_SdssShape".
50  """
51  name = AlgClass.__name__
52  pkg = AlgClass.__module__
53  name = name.replace("Algorithm", "")
54  terms = pkg.split(".")
55  if terms[-1].endswith("Lib"):
56  terms = terms[:-1]
57  if terms[0] == "lsst":
58  terms = terms[1:]
59  if terms[0] == "meas":
60  terms = terms[1:]
61  if name.lower().startswith(terms[-1].lower()):
62  terms = terms[:-1]
63  return "%s_%s" % ("_".join(terms), name)
def generateAlgorithmName
Definition: base.py:42
def lsst.meas.base.base.register (   name)

A Python decorator that registers a class, using the given name, in its base class's PluginRegistry.

For example,

1 @register("base_TransformedCentroid")
2 class ForcedTransformedCentroidPlugin(ForcedPlugin):
3  ...

is equivalent to:

1 class ForcedTransformedCentroidPlugin(ForcedPlugin):
2  ...
3 @ForcedPlugin.registry.register("base_TransformedCentroid", ForcedTransformedCentroidPlugin)

Definition at line 115 of file base.py.

116 def register(name):
117  """!
118  A Python decorator that registers a class, using the given name, in its base class's PluginRegistry.
119  For example,
120  @code
121  @register("base_TransformedCentroid")
122  class ForcedTransformedCentroidPlugin(ForcedPlugin):
123  ...
124  @endcode
125  is equivalent to:
126  @code
127  class ForcedTransformedCentroidPlugin(ForcedPlugin):
128  ...
129  @ForcedPlugin.registry.register("base_TransformedCentroid", ForcedTransformedCentroidPlugin)
130  @endcode
131  """
132  def decorate(PluginClass):
133  PluginClass.registry.register(name, PluginClass)
134  return PluginClass
135  return decorate
136 
def register
A Python decorator that registers a class, using the given name, in its base class's PluginRegistry...
Definition: base.py:115

Variable Documentation

tuple lsst.meas.base.base.FATAL_EXCEPTIONS = (MemoryError, FatalAlgorithmError)

Definition at line 40 of file base.py.