lsst.pipe.drivers  13.0-17-g3ce57e5+18
 All Classes Namespaces Files Functions Variables Pages
Functions | Variables
lsst.pipe.drivers.checksum Namespace Reference

Functions

def checksum
 Calculate a checksum of an object. More...
 

Variables

list __all__ = ["checksum", ]
 
tuple exposureTypes = (afwImage.ExposureF, afwImage.ExposureD,)
 
tuple maskedImageTypes = (afwImage.MaskedImageF, afwImage.MaskedImageD,)
 
tuple decoratedImageTypes = (afwImage.DecoratedImageF, afwImage.DecoratedImageD,)
 
tuple imageTypes = (afwImage.ImageF, afwImage.ImageD, afwImage.ImageI,)
 
int PROTOCOL = 2
 
dictionary sumFunctions
 

Function Documentation

def lsst.pipe.drivers.checksum.checksum (   obj,
  header = None,
  sumType = "MD5" 
)

Calculate a checksum of an object.

We have special handling for images (e.g., breaking a MaskedImage into its various components), but the object may be any picklable type.

Parameters
objObject for which to calculate the checksum
headerFITS header (PropertyList) to update with checksum values, or None
sumTypeType of checksum to calculate
Returns
dict with header keyword,value pairs

Definition at line 29 of file checksum.py.

Variable Documentation

list lsst.pipe.drivers.checksum.__all__ = ["checksum", ]

Definition at line 12 of file checksum.py.

tuple lsst.pipe.drivers.checksum.decoratedImageTypes = (afwImage.DecoratedImageF, afwImage.DecoratedImageD,)

Definition at line 17 of file checksum.py.

tuple lsst.pipe.drivers.checksum.exposureTypes = (afwImage.ExposureF, afwImage.ExposureD,)

Definition at line 15 of file checksum.py.

tuple lsst.pipe.drivers.checksum.imageTypes = (afwImage.ImageF, afwImage.ImageD, afwImage.ImageI,)

Definition at line 18 of file checksum.py.

tuple lsst.pipe.drivers.checksum.maskedImageTypes = (afwImage.MaskedImageF, afwImage.MaskedImageD,)

Definition at line 16 of file checksum.py.

int lsst.pipe.drivers.checksum.PROTOCOL = 2

Definition at line 20 of file checksum.py.

dictionary lsst.pipe.drivers.checksum.sumFunctions
Initial value:
1 = {
2  "CRC32": lambda obj: zlib.crc32(pickle.dumps(obj, PROTOCOL)),
3  "MD5": lambda obj: hashlib.md5(pickle.dumps(obj, PROTOCOL)).hexdigest(),
4 }

Definition at line 23 of file checksum.py.