ButlerQuantumContext¶
- class lsst.pipe.base.ButlerQuantumContext(*args, **kwargs)¶
- Bases: - QuantumContext- Deprecated version of - QuantumContext.- Deprecated since version v26: ButlerQuantumContext has been renamed to QuantumContext and been given extra functionality. Please use the new name. Will be removed after v26. - Attributes Summary - Structure managing all dimensions recognized by this data repository ( - DimensionUniverse).- Methods Summary - get(dataset)- Fetch data from the butler. - put(values, dataset)- Put data into the butler. - Attributes Documentation - dimensions¶
- Structure managing all dimensions recognized by this data repository ( - DimensionUniverse).
 - Methods Documentation - get(dataset: InputQuantizedConnection | list[lsst.daf.butler._dataset_ref.DatasetRef | None] | list[lsst.pipe.base.connections.DeferredDatasetRef | None] | DatasetRef | DeferredDatasetRef | None) Any¶
- Fetch data from the butler. - Parameters:
- datasetsee description
- This argument may either be an - InputQuantizedConnectionwhich describes all the inputs of a quantum, a list of- DatasetRef, or a single- DatasetRef. The function will get and return the corresponding datasets from the butler. If- Noneis passed in place of a- DatasetRefthen the corresponding returned object will be- None.
 
- Returns:
- returnobject
- This function returns arbitrary objects fetched from the bulter. The structure these objects are returned in depends on the type of the input argument. If the input dataset argument is a - InputQuantizedConnection, then the return type will be a dictionary with keys corresponding to the attributes of the- InputQuantizedConnection(which in turn are the attribute identifiers of the connections). If the input argument is of type- listof- DatasetRefthen the return type will be a list of objects. If the input argument is a single- DatasetRefthen a single object will be returned.
 
- return
- Raises:
- ValueError
- Raised if a - DatasetRefis passed to get that is not defined in the quantum object
 
 
 - put(values: Struct | list[Any] | Any, dataset: OutputQuantizedConnection | list[lsst.daf.butler._dataset_ref.DatasetRef] | DatasetRef) None¶
- Put data into the butler. - Parameters:
- valuesStructorlistofobjectorobject
- The data that should be put with the butler. If the type of the dataset is - OutputQuantizedConnectionthen this argument should be a- Structwith corresponding attribute names. Each attribute should then correspond to either a list of object or a single object depending of the type of the corresponding attribute on dataset. I.e. if- dataset.calexpis- [datasetRef1, datasetRef2]then- values.calexpshould be- [calexp1, calexp2]. Like wise if there is a single ref, then only a single object need be passed. The same restriction applies if dataset is directly a- listof- DatasetRefor a single- DatasetRef.
- datasetOutputQuantizedConnectionorlist`[`DatasetRef] orDatasetRef
- This argument may either be an - InputQuantizedConnectionwhich describes all the inputs of a quantum, a list of- lsst.daf.butler.DatasetRef, or a single- lsst.daf.butler.DatasetRef. The function will get and return the corresponding datasets from the butler.
 
- values
- Raises:
- ValueError
- Raised if a - DatasetRefis passed to put that is not defined in the- Quantumobject, or the type of values does not match what is expected from the type of dataset.