LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Public Member Functions | |
def | __init__ |
def | get |
def | put |
def | subLevels |
def | subItems |
def | datasetExists |
def | getButler |
Public Attributes | |
butlerSubset | |
dataId | |
A ButlerDataRef is a reference to a potential dataset or group of datasets that is portable between compatible dataset types. As such, it can be used to create or retrieve datasets. ButlerDataRefs are (conceptually) created as elements of a ButlerSubset by Butler.subset(). They are initially specific to the dataset type passed to that call, but they may be used with any other compatible dataset type. Dataset type compatibility must be determined externally (or by trial and error). ButlerDataRefs may be created at any level of a data identifier hierarchy. If the level is not one at which datasets exist, a ButlerSubset with lower-level ButlerDataRefs can be created using ButlerDataRef.subItems(). Public methods: get(self, datasetType=None, **rest) put(self, obj, datasetType=None, **rest) subItems(self, level=None) datasetExists(self, datasetType=None, **rest) getButler(self)
Definition at line 132 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.__init__ | ( | self, | |
butlerSubset, | |||
dataId | |||
) |
For internal use only. ButlerDataRefs should only be created by ButlerSubset and ButlerSubsetIterator.
Definition at line 162 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.datasetExists | ( | self, | |
datasetType = None , |
|||
rest | |||
) |
Determine if a dataset exists of the given type (or the type used when creating the ButlerSubset, if None) as specified by the ButlerDataRef. @param datasetType (str) dataset type to check. @param **rest keywords arguments with data identifiers @returns bool
Definition at line 239 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.get | ( | self, | |
datasetType = None , |
|||
rest | |||
) |
Retrieve a dataset of the given type (or the type used when creating the ButlerSubset, if None) as specified by the ButlerDataRef. @param datasetType (str) dataset type to retrieve. @param **rest keyword arguments with data identifiers @returns object corresponding to the given dataset type.
Definition at line 171 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.getButler | ( | self | ) |
Return the butler associated with this data reference.
Definition at line 253 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.put | ( | self, | |
obj, | |||
datasetType = None , |
|||
doBackup = False , |
|||
rest | |||
) |
Persist a dataset of the given type (or the type used when creating the ButlerSubset, if None) as specified by the ButlerDataRef. @param obj object to persist. @param datasetType (str) dataset type to persist. @param doBackup if True, rename existing instead of overwriting @param **rest keyword arguments with data identifiers WARNING: Setting doBackup=True is not safe for parallel processing, as it may be subject to race conditions.
Definition at line 185 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.subItems | ( | self, | |
level = None |
|||
) |
Generate a ButlerSubset at a lower level of the hierarchy than this ButlerDataRef, using it as a partial data id. If level is None, a default lower level for the original ButlerSubset level and dataset type is used. @param level (str) the hierarchy level to descend to. @returns (ButlerSubset) resulting from the lower-level query or () if there is no lower level.
Definition at line 219 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.subLevels | ( | self | ) |
Return a list of the lower levels of the hierarchy than this ButlerDataRef. @returns (iterable) list of strings with level keys.
Definition at line 203 of file butlerSubset.py.
lsst.daf.persistence.butlerSubset.ButlerDataRef.butlerSubset |
Definition at line 168 of file butlerSubset.py.
lsst.daf.persistence.butlerSubset.ButlerDataRef.dataId |
Definition at line 169 of file butlerSubset.py.