lsst.pipe.base  21.0.0-17-g8839fe5+3578717ea1
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.base.shims.ShimButler Class Reference

Public Member Functions

def __init__ (self, butler3)
 
def datasetExists (self, datasetType, dataId=None, write=False, **rest)
 
def get (self, datasetType, dataId=None, immediate=True, **rest)
 
def put (self, obj, datasetType, dataId=None, doBackup=False, **rest)
 
def dataRef (self, datasetType, level=None, dataId=None, **rest)
 

Static Public Attributes

float GENERATION = 2.5
 

Detailed Description

A shim for a Gen2 `~lsst.daf.persistence.Butler` with a Gen3
`~lsst.daf.butler.Butler` backend.

Parameters
----------
butler3 : `lsst.daf.butler.Butler`
    Generation 3 Butler instance.

Definition at line 38 of file shims.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.base.shims.ShimButler.__init__ (   self,
  butler3 
)

Definition at line 52 of file shims.py.

Member Function Documentation

◆ dataRef()

def lsst.pipe.base.shims.ShimButler.dataRef (   self,
  datasetType,
  level = None,
  dataId = None,
**  rest 
)
Return a DataRef associated with the given dataset type and data ID.

Parameters
----------
datasetType : `str`
    Name of the dataset type.
dataId : `dict` or `~lsst.daf.butler.DataId`, optional
    A Generation 3 data ID that identifies the dataset.
level
    This option is provided for compatibility with
    `lsst.daf.persistence.Butler`, but must be `None`.
rest
    Additional key-value pairs to augment the given data ID.

Definition at line 169 of file shims.py.

◆ datasetExists()

def lsst.pipe.base.shims.ShimButler.datasetExists (   self,
  datasetType,
  dataId = None,
  write = False,
**  rest 
)
Check whether a datataset exists in the repository.

Parameters
----------
datasetType : `str`
    Name of the Gen2 dataset type.
dataId : `dict` or `~lsst.daf.butler.DataId`, optional
    A Generation 3 data ID that identifies the dataset.
write : `bool`
    This option is provided for compatibility with
    `lsst.daf.persistence.Butler`, but must be `False`.
rest
    Additional key-value pairs to augment the given data ID.

Returns
-------
exists : `bool`
    `True` if the dataset is present in the repository, `False`
    otherwise.

Definition at line 75 of file shims.py.

◆ get()

def lsst.pipe.base.shims.ShimButler.get (   self,
  datasetType,
  dataId = None,
  immediate = True,
**  rest 
)
Retrieve a dataset.

Parameters
----------
datasetType : `str`
    Name of the Gen2 dataset type.
dataId : `dict` or `~lsst.daf.butler.DataId`, optional
    A Generation 3 data ID that identifies the dataset.
immediate : `bool`
    This option is provided for compatibility with
    `lsst.daf.persistence.Butler`, but is ignored.
rest
    Additional key-value pairs to augment the given data ID.

Returns
-------
dataset
    Retrieved object.

Raises
------
`~lsst.daf.persistence.NoResults`
    Raised if the dataset does not exist.

Definition at line 107 of file shims.py.

◆ put()

def lsst.pipe.base.shims.ShimButler.put (   self,
  obj,
  datasetType,
  dataId = None,
  doBackup = False,
**  rest 
)
Write a dataset.

Parameters
----------
obj
    Object to write.
datasetType : `str`
    Name of the Gen2 dataset type.
dataId : `dict` or `~lsst.daf.butler.DataId`, optional
    A Generation 3 data ID that identifies the dataset.
doBackup : `bool`
    This option is provided for compatibility with
    `lsst.daf.persistence.Butler`, but must be `False`.
rest
    Additional key-value pairs to augment the given data ID.

Definition at line 147 of file shims.py.

Member Data Documentation

◆ GENERATION

float lsst.pipe.base.shims.ShimButler.GENERATION = 2.5
static

Definition at line 48 of file shims.py.


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