lsst.daf.persistence  13.0-35-g3a9824c
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Public Attributes | List of all members
lsst.daf.persistence.butlerSubset.ButlerDataRef Class Reference
Inheritance diagram for lsst.daf.persistence.butlerSubset.ButlerDataRef:

Public Member Functions

def __init__
 
def __repr__
 
def get
 
def put
 
def subLevels
 
def subItems
 
def datasetExists
 
def getButler
 

Public Attributes

 butlerSubset
 
 dataId
 

Detailed Description

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 145 of file butlerSubset.py.

Constructor & Destructor Documentation

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 175 of file butlerSubset.py.

Member Function Documentation

def lsst.daf.persistence.butlerSubset.ButlerDataRef.__repr__ (   self)

Definition at line 184 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 266 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 187 of file butlerSubset.py.

def lsst.daf.persistence.butlerSubset.ButlerDataRef.getButler (   self)
Return the butler associated with this data reference.

Definition at line 280 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 200 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 236 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 218 of file butlerSubset.py.

Member Data Documentation

lsst.daf.persistence.butlerSubset.ButlerDataRef.butlerSubset

Definition at line 181 of file butlerSubset.py.

lsst.daf.persistence.butlerSubset.ButlerDataRef.dataId

Definition at line 182 of file butlerSubset.py.


The documentation for this class was generated from the following file: