MetricsDelegate¶
- class lsst.daf.butler.tests.MetricsDelegate(storageClass: StorageClass)¶
 Bases:
StorageClassDelegateParameter handler for parameters using Metrics.
Methods Summary
getComponent(composite, componentName)Attempt to retrieve component from composite object by heuristic.
handleParameters(inMemoryDataset[, parameters])Modify the in-memory dataset using the supplied parameters, returning a possibly new object.
selectResponsibleComponent(readComponent, ...)Select the best component for calculating a derived component.
Methods Documentation
- getComponent(composite: Any, componentName: str) Any¶
 Attempt to retrieve component from composite object by heuristic.
Will attempt a direct attribute retrieval, or else getter methods of the form “get_componentName” and “getComponentName”.
- handleParameters(inMemoryDataset: Any, parameters: Mapping[str, Any] | None = None) Any¶
 Modify the in-memory dataset using the supplied parameters, returning a possibly new object.
- Parameters:
 - Returns:
 - inMemoryDataset
object Updated form of supplied in-memory dataset, after parameters have been used.
- inMemoryDataset
 
- classmethod selectResponsibleComponent(readComponent: str, fromComponents: set[str | None]) str¶
 Select the best component for calculating a derived component.
Given a possible set of components to choose from, return the component that should be used to calculate the requested derived component.
- Parameters:
 - Returns:
 - required
str The component that should be used.
- required
 - Raises:
 - NotImplementedError
 Raised if this delegate refuses to answer the question.
- ValueError
 Raised if this delegate can not determine a relevant component from the supplied options.