LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Public Member Functions | List of all members
lsst.meas.base.pluginRegistry.PluginRegistry Class Reference

Base class for plugin registries. More...

Inheritance diagram for lsst.meas.base.pluginRegistry.PluginRegistry:

Classes

class  Configurable
 Class used as the actual element in the registry. More...
 

Public Member Functions

def register
 Register a Plugin class with the given name. More...
 
def makeField
 

Detailed Description

Base class for plugin registries.

The Plugin class allowed in the registry is defined in the ctor of the registry.

Single-frame and forced plugins have different registries.

Definition at line 56 of file pluginRegistry.py.

Member Function Documentation

def lsst.meas.base.pluginRegistry.PluginRegistry.makeField (   self,
  doc,
  default = None,
  optional = False,
  multi = False 
)

Definition at line 118 of file pluginRegistry.py.

119  def makeField(self, doc, default=None, optional=False, multi=False):
120  return lsst.pex.config.RegistryField(doc, self, default, optional, multi)
121 
def lsst.meas.base.pluginRegistry.PluginRegistry.register (   self,
  name,
  PluginClass,
  shouldApCorr = False,
  apCorrList = () 
)

Register a Plugin class with the given name.

The same Plugin may be registered multiple times with different names; this can be useful if we often want to run it multiple times with different configuration.

Parameters
[in]namename of plugin class. This is used as a prefix for all fields produced by the Plugin, and it should generally contain the name of the Plugin or Algorithm class itself as well as enough of the namespace to make it clear where to find the code. For example "base_GaussianFlux" indicates an algorithm in meas_base that measures Gaussian Flux and produces fields such as "base_GaussianFlux_flux", "base_GaussianFlux_fluxSigma" and "base_GaussianFlux_flag".
[in]shouldApCorrif True then this algorithm measures a flux that should be aperture corrected. This is shorthand for apCorrList=[name] and is ignored if apCorrList is specified.
[in]apCorrListlist of field name prefixes for flux fields that should be aperture corrected. If an algorithm produces a single flux that should be aperture corrected then it is simpler to set shouldApCorr=True. But if an algorithm produces multiple such fields then it must specify apCorrList, instead. For example modelfit_CModel produces 3 such fields: apCorrList=("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def") If apCorrList is non-empty then shouldApCorr is ignored.

Definition at line 90 of file pluginRegistry.py.

90 
91  def register(self, name, PluginClass, shouldApCorr=False, apCorrList=()):
92  """!
93  Register a Plugin class with the given name.
94 
95  The same Plugin may be registered multiple times with different names; this can
96  be useful if we often want to run it multiple times with different configuration.
97 
98  @param[in] name name of plugin class. This is used as a prefix for all fields produced by the Plugin,
99  and it should generally contain the name of the Plugin or Algorithm class itself
100  as well as enough of the namespace to make it clear where to find the code.
101  For example "base_GaussianFlux" indicates an algorithm in meas_base
102  that measures Gaussian Flux and produces fields such as "base_GaussianFlux_flux",
103  "base_GaussianFlux_fluxSigma" and "base_GaussianFlux_flag".
104  @param[in] shouldApCorr if True then this algorithm measures a flux that should be aperture
105  corrected. This is shorthand for apCorrList=[name] and is ignored if apCorrList is specified.
106  @param[in] apCorrList list of field name prefixes for flux fields that should be aperture corrected.
107  If an algorithm produces a single flux that should be aperture corrected then it is simpler
108  to set shouldApCorr=True. But if an algorithm produces multiple such fields then it must
109  specify apCorrList, instead. For example modelfit_CModel produces 3 such fields:
110  apCorrList=("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def")
111  If apCorrList is non-empty then shouldApCorr is ignored.
112  """
113  lsst.pex.config.Registry.register(self, name, self.Configurable(name, PluginClass))
114  if shouldApCorr and not apCorrList:
115  apCorrList = [name]
116  for prefix in apCorrList:
117  addApCorrName(prefix)
Class used as the actual element in the registry.
def register
Register a Plugin class with the given name.
def addApCorrName
Add to the set of field name prefixes for fluxes that should be aperture corrected.

The documentation for this class was generated from the following file: