LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
Public Member Functions | |
def | __init__ (self, butlerSubset, dataId) |
def | __repr__ (self) |
def | get (self, datasetType=None, **rest) |
def | put (self, obj, datasetType=None, doBackup=False, **rest) |
def | getUri (self, datasetType=None, write=False, **rest) |
def | subLevels (self) |
def | subItems (self, level=None) |
def | datasetExists (self, datasetType=None, write=False, **rest) |
def | getButler (self) |
Public Attributes | |
butlerSubset | |
dataId | |
Static Public Attributes | |
int | GENERATION = 2 |
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 146 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 180 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.__repr__ | ( | self | ) |
Definition at line 189 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.datasetExists | ( | self, | |
datasetType = None , |
|||
write = False , |
|||
** | 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 write (bool) if True, search only in output repositories @param **rest keywords arguments with data identifiers @returns bool
Definition at line 301 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 192 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.getButler | ( | self | ) |
Return the butler associated with this data reference.
Definition at line 316 of file butlerSubset.py.
def lsst.daf.persistence.butlerSubset.ButlerDataRef.getUri | ( | self, | |
datasetType = None , |
|||
write = False , |
|||
** | rest | ||
) |
Return the URL for a dataset .. warning:: This is intended only for debugging. The URI should never be used for anything other than printing. .. note:: In the event there are multiple URIs, we return only the first. .. note:: getUri() does not currently support composite datasets. Parameters ---------- datasetType : `str`, optional The dataset type of interest. write : `bool`, optional Return the URI for writing? rest : `dict`, optional Keyword arguments for the data id. Returns ------- uri : `str` URI for dataset
Definition at line 223 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 205 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. As currently implemented, the default sublevels for all the repositories used by this Butler instance must match for the Butler to be able to select a default sublevel to get the subset. @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 271 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 253 of file butlerSubset.py.
lsst.daf.persistence.butlerSubset.ButlerDataRef.butlerSubset |
Definition at line 186 of file butlerSubset.py.
lsst.daf.persistence.butlerSubset.ButlerDataRef.dataId |
Definition at line 187 of file butlerSubset.py.
|
static |
Definition at line 176 of file butlerSubset.py.