TractMeasurementTask#
- class lsst.faro.measurement.TractMeasurementTask(config, *args, **kwargs)#
Bases:
CatalogMeasurementBaseTaskMethods Summary
run(catalogs, photoCalibs, astromCalibs, dataIds)Run the MetricTask on in-memory data.
runQuantum(butlerQC, inputRefs, outputRefs)Do Butler I/O to provide in-memory objects for run.
Methods Documentation
- run(catalogs: List[SourceCatalog], photoCalibs: List[PhotoCalib], astromCalibs: List[SkyWcs], dataIds)#
Run the MetricTask on in-memory data.
Parameters#
- **kwargs
Keyword arguments matching the inputs given in the class config; see
lsst.pipe.base.PipelineTask.runfor more details.
Returns#
- struct
lsst.pipe.base.Struct A
Structcontaining at least the following component:measurement: the value of the metric (lsst.verify.MeasurementorNone). This method is not responsible for adding mandatory metadata (e.g., the data ID); this is handled by the caller.Nonemay be used to indicate that a metric is undefined or irrelevant instead of raisingNoWorkFound.
Raises#
- lsst.verify.tasks.MetricComputationError
Raised if an algorithmic or system error prevents calculation of the metric. Examples include corrupted input data or unavoidable exceptions raised by analysis code. The
MetricComputationErrorshould be chained to a more specific exception describing the root cause.Not having enough data for a metric to be applicable is not an error, and should raise
NoWorkFound(see below) instead of this exception.- lsst.pipe.base.NoWorkFound
Raised if the metric is ill-defined or otherwise inapplicable to the data. Typically this means that the pipeline step or option being measured was not run.
- runQuantum(butlerQC, inputRefs, outputRefs)#
Do Butler I/O to provide in-memory objects for run.
This specialization of runQuantum performs error-handling specific to MetricTasks.