LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Classes | |
class | WrappedSingleFramePlugin |
class | WrappedForcedPlugin |
Functions | |
def | wrapAlgorithmControl |
Wrap a C++ algorithm's control class into a Python Config class. More... | |
def | wrapAlgorithm |
Wrap a C++ Algorithm class into a Python Plugin class. More... | |
def | wrapSingleFrameAlgorithm |
Wrap a C++ SingleFrameAlgorithm class into a Python SingleFramePlugin class. More... | |
def | wrapForcedAlgorithm |
Wrap a C++ ForcedAlgorithm class into a Python ForcedPlugin class. More... | |
def | wrapSimpleAlgorithm |
Wrap a C++ SimpleAlgorithm class into both a Python SingleFramePlugin and ForcedPlugin classes. More... | |
Variables | |
tuple | __all__ = ("wrapSingleFrameAlgorithm", "wrapForcedAlgorithm", "wrapSimpleAlgorithm") |
def lsst.meas.base.wrappers.wrapAlgorithm | ( | Base, | |
AlgClass, | |||
factory, | |||
executionOrder, | |||
name = None , |
|||
Control = None , |
|||
ConfigClass = None , |
|||
TransformClass = None , |
|||
doRegister = True , |
|||
shouldApCorr = False , |
|||
apCorrList = () , |
|||
kwds | |||
) |
Wrap a C++ Algorithm class into a Python Plugin class.
[in] | Base | Base class for the returned Plugin; one of SingleFramePlugin or ForcedPlugin |
[in] | AlgClass | Swigged C++ Algorithm class to convert; must be a subclass of SingleFrameAlgorithm or ForcedAlgorithm (matching the Base argument), or an unrelated class with the same measure() and measureN() signatures as those base classes. |
[in] | factory | A callable that is used to construct an instance of AlgClass. It must take four arguments, either (config, name, schema, metadata) or (config, name, schemaMapper, metadata), depending on whether the algorithm is single-frame or forced. |
[in] | executionOrder | The order this plugin should be run, relative to others (see BasePlugin.getExecutionOrder()). |
[in] | name | String to use when registering the algorithm. Ignored if doRegistry=False, set to generateAlgorithmName(AlgClass) if None. |
[in] | Control | Swigged C++ Control class for the algorithm; AlgClass.Control is used if None. Ignored if ConfigClass is not None. |
[in] | ConfigClass | Python Config class that wraps the C++ Algorithm's swigged Control class. If None, wrapAlgorithmControl is called to generate a Config class using the Control argument. |
[in] | TransformClass | Transformation which may be used to post-process the results of measurement. If None, the default (defined by BasePlugin) is used. |
[in] | doRegister | If True (the default), register the plugin with Base's registry, allowing it to be used by measurement Tasks. |
[in] | shouldApCorr | Does this algorithm measure a flux that can be aperture corrected? This is shorthand for apCorrList=[name] and is ignored if apCorrList is specified. |
[in] | apCorrList | List 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. If non-empty and doRegister is True then the names are added to the set retrieved by getApCorrNameSet |
[in] | **kwds | Additional keyword arguments passed to generateAlgorithmControl, including:
|
This function is generally only called by the public wrapSingleFrameAlgorithm, wrapForcedAlgorithm, and wrapSimpleAlgorithm functions; it is unlikely users will have to call it directly.
Definition at line 79 of file wrappers.py.
def lsst.meas.base.wrappers.wrapAlgorithmControl | ( | Base, | |
Control, | |||
hasMeasureN = False |
|||
) |
Wrap a C++ algorithm's control class into a Python Config class.
[in] | Base | Base class for the returned ConfigClass; one of SingleFramePluginConfig or ForcedPluginConfig |
[in] | Control | Control class to be wrapped (a Swigged C++ class) |
[in] | hasMeasureN | Whether the plugin supports fitting multiple objects at once (if so, a config option to enable/disable this will be added). |
This function is generally only called by wrapAlgorithm; it is unlikely users will have to call it directly.
Definition at line 43 of file wrappers.py.
def lsst.meas.base.wrappers.wrapForcedAlgorithm | ( | AlgClass, | |
executionOrder, | |||
name = None , |
|||
needsMetadata = False , |
|||
hasMeasureN = False , |
|||
needsSchemaOnly = False , |
|||
kwds | |||
) |
Wrap a C++ ForcedAlgorithm class into a Python ForcedPlugin class.
[in] | AlgClass | Swigged C++ Algorithm class to convert; must be a subclass of ForcedAlgorithm, or an unrelated class with the same measure(), measureN(), and fail() signatures. |
[in] | executionOrder | The order this plugin should be run, relative to others (see BasePlugin.getExecutionOrder()). |
[in] | name | String to use when registering the algorithm. Ignored if doRegistry=False, set to generateAlgorithmName(AlgClass) if None. |
[in] | needsMetadata | Sets whether the AlgClass's constructor should be passed a PropertySet metadata argument. |
[in] | hasMeasureN | Whether the algorithm supports simultaneous measurement of multiple sources. If True, a bool doMeasureN field will be added to the generated Config class, and its value will be passed as the last argument when calling the AlgClass constructor. |
[in] | needsSchemaOnly | Whether the algorithm constructor expects a Schema argument (representing the output Schema) rather than the full SchemaMapper (which provides access to both the reference Schema and the output Schema). |
[in] | **kwds | Additional keyword arguments passed to the lower-level wrapAlgorithm and wrapAlgorithmControl classes. These include:
|
The needsMetadata, hasMeasureN, and needsSchemaOnly arguments combine to determine the expected constructor signature; we always expect the first two arguments to be:
Control const & ctrl, std::string const & name
If needsSchemaOnly is True, then the third argument will be
Schema & schema
otherwise, it will be:
SchemaMapper & schemaMapper
If needsMetadata, we also append:
PropertySet & metadata
If hasMeasureN, we also append:
bool doMeasureN
If both are True, the metadata PropertySet precedes the doMeasureN bool.
Definition at line 229 of file wrappers.py.
def lsst.meas.base.wrappers.wrapSimpleAlgorithm | ( | AlgClass, | |
executionOrder, | |||
name = None , |
|||
needsMetadata = False , |
|||
hasMeasureN = False , |
|||
kwds | |||
) |
Wrap a C++ SimpleAlgorithm class into both a Python SingleFramePlugin and ForcedPlugin classes.
[in] | AlgClass | Swigged C++ Algorithm class to convert; must be a subclass of simpleAlgorithm, or an unrelated class with the same measure(), measureN(), and fail() signatures. |
[in] | executionOrder | The order this plugin should be run, relative to others (see BasePlugin.getExecutionOrder()). |
[in] | name | String to use when registering the algorithm. Ignored if doRegistry=False, set to generateAlgorithmName(AlgClass) if None. |
[in] | needsMetadata | Sets whether the AlgClass's constructor should be passed a PropertySet metadata argument. |
[in] | hasMeasureN | Whether the algorithm supports simultaneous measurement of multiple sources. If True, a bool doMeasureN field will be added to the generated Config class, and its value will be passed as the last argument when calling the AlgClass constructor. |
[in] | **kwds | Additional keyword arguments passed to the lower-level wrapAlgorithm and wrapAlgorithmControl classes. These include:
|
The needsMetadata and hasMeasureN arguments combine to determine the expected constructor signature; we always expect the first three arguments to be:
Control const & ctrl, std::string const & name, Schema & schema
If needsMetadata, we also append:
PropertySet & metadata
If hasMeasureN, we also append:
bool doMeasureN
If both are True, the metadata PropertySet precedes the doMeasureN bool.
Definition at line 323 of file wrappers.py.
def lsst.meas.base.wrappers.wrapSingleFrameAlgorithm | ( | AlgClass, | |
executionOrder, | |||
name = None , |
|||
needsMetadata = False , |
|||
hasMeasureN = False , |
|||
kwds | |||
) |
Wrap a C++ SingleFrameAlgorithm class into a Python SingleFramePlugin class.
[in] | AlgClass | Swigged C++ Algorithm class to convert; must be a subclass of SingleFrameAlgorithm, or an unrelated class with the same measure(), measureN(), and fail() signatures. |
[in] | executionOrder | The order this plugin should be run, relative to others (see BasePlugin.getExecutionOrder()). |
[in] | name | String to use when registering the algorithm. Ignored if doRegistry=False, set to generateAlgorithmName(AlgClass) if None. |
[in] | needsMetadata | Sets whether the AlgClass's constructor should be passed a PropertySet metadata argument. |
[in] | hasMeasureN | Whether the algorithm supports simultaneous measurement of multiple sources. If True, a bool doMeasureN field will be added to the generated Config class, and its value will be passed as the last argument when calling the AlgClass constructor. |
[in] | **kwds | Additional keyword arguments passed to the lower-level wrapAlgorithm and wrapAlgorithmControl classes. These include:
|
The needsMetadata and hasMeasureN arguments combine to determine the expected constructor signature; we always expect the first three arguments to be:
Control const & ctrl, std::string const & name, Schema & schema
If needsMetadata, we also append:
PropertySet & metadata
If hasMeasureN, we also append:
bool doMeasureN
If both are True, the metadata PropertySet precedes the doMeasureN bool.
Definition at line 151 of file wrappers.py.
tuple lsst.meas.base.wrappers.__all__ = ("wrapSingleFrameAlgorithm", "wrapForcedAlgorithm", "wrapSimpleAlgorithm") |
Definition at line 8 of file wrappers.py.