lsst.daf.persistence g6a31054a6e+405378f249
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.daf.persistence.butlerSubset.ButlerSubset Class Reference

Public Member Functions

def __init__ (self, butler, datasetType, level, dataId)
 
def __repr__ (self)
 
def __len__ (self)
 
def __iter__ (self)
 

Public Attributes

 butler
 
 datasetType
 
 dataId
 
 cache
 
 level
 

Static Public Attributes

int GENERATION = 2
 

Detailed Description

ButlerSubset is a container for ButlerDataRefs.  It represents a
collection of data ids that can be used to obtain datasets of the type
used when creating the collection or a compatible dataset type.  It can be
thought of as the result of a query for datasets matching a partial data
id.

The ButlerDataRefs are generated at a specified level of the data id
hierarchy.  If that is not the level at which datasets are specified, the
ButlerDataRef.subItems() method may be used to dive further into the
ButlerDataRefs.

ButlerSubsets should generally be created using Butler.subset().

This mechanism replaces the creation of butlers using partial dataIds.

Public methods:

__init__(self, butler, datasetType, level, dataId)

__len__(self)

__iter__(self)

Definition at line 33 of file butlerSubset.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.daf.persistence.butlerSubset.ButlerSubset.__init__ (   self,
  butler,
  datasetType,
  level,
  dataId 
)
Create a ButlerSubset by querying a butler for data ids matching a
given partial data id for a given dataset type at a given hierarchy
level.

@param butler (Butler)    butler that is being queried.
@param datasetType (str)  the type of dataset to query.
@param level (str)        the hierarchy level to descend to. if empty string will look up the default
                          level.
@param dataId (dict)      the (partial or complete) data id.

Definition at line 64 of file butlerSubset.py.

Member Function Documentation

◆ __iter__()

def lsst.daf.persistence.butlerSubset.ButlerSubset.__iter__ (   self)
Iterator over the ButlerDataRefs in the ButlerSubset.

@returns (ButlerIterator)

Definition at line 120 of file butlerSubset.py.

◆ __len__()

def lsst.daf.persistence.butlerSubset.ButlerSubset.__len__ (   self)
Number of ButlerDataRefs in the ButlerSubset.

@returns (int)

Definition at line 111 of file butlerSubset.py.

◆ __repr__()

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

Definition at line 107 of file butlerSubset.py.

Member Data Documentation

◆ butler

lsst.daf.persistence.butlerSubset.ButlerSubset.butler

Definition at line 76 of file butlerSubset.py.

◆ cache

lsst.daf.persistence.butlerSubset.ButlerSubset.cache

Definition at line 79 of file butlerSubset.py.

◆ dataId

lsst.daf.persistence.butlerSubset.ButlerSubset.dataId

Definition at line 78 of file butlerSubset.py.

◆ datasetType

lsst.daf.persistence.butlerSubset.ButlerSubset.datasetType

Definition at line 77 of file butlerSubset.py.

◆ GENERATION

int lsst.daf.persistence.butlerSubset.ButlerSubset.GENERATION = 2
static

Definition at line 60 of file butlerSubset.py.

◆ level

lsst.daf.persistence.butlerSubset.ButlerSubset.level

Definition at line 80 of file butlerSubset.py.


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