DataIdContainer¶
-
class
lsst.pipe.base.
DataIdContainer
(level=None)¶ Bases:
object
Container for data IDs and associated data references.
Parameters: Notes
Override this class for data IDs that require special handling to be converted to
data references
, and specify the override class asContainerClass
foradd_id_argument
.If you don’t want the argument parser to compute data references, specify
doMakeDataRefList=False
inadd_id_argument
.Methods Summary
castDataIds
(butler)Validate data IDs and cast them to the correct type (modify idList in place). makeDataRefList
(namespace)Compute refList based on idList. setDatasetType
(datasetType)Set actual dataset type, once it is known. Methods Documentation
-
castDataIds
(butler)¶ Validate data IDs and cast them to the correct type (modify idList in place).
This code casts the values in the data IDs dicts in
dataIdList
to the type required by the butler. Data IDs are read from the command line asstr
, but the butler requires some values to be other types. For example “visit” values should beint
.Parameters: - butler :
lsst.daf.persistence.Butler
Data butler.
- butler :
-
makeDataRefList
(namespace)¶ Compute refList based on idList.
Parameters: - namespace :
argparse.Namespace
Results of parsing command-line. The
butler
andlog
elements must be set.
Notes
Not called if
add_id_argument
was called withdoMakeDataRefList=False
.- namespace :
-
setDatasetType
(datasetType)¶ Set actual dataset type, once it is known.
Parameters: - datasetType :
str
Dataset type.
Notes
The reason
datasetType
is not a constructor argument is that some subclasses do not know the dataset type until the command is parsed. Thus, to reduce special cases in the code,datasetType
is always set after the command is parsed.- datasetType :
-