|
lsst.afw
18.1.0-18-gf57f4888d+1
|
Public Member Functions | |
| def | addEntry (self, keyname, attribute_name, default=None, transform=lambda x:x) |
| def | setAttributes (self, obj, metadata, doRaise=True) |
Class to hold mapping of header cards to attributes
Definition at line 78 of file fitsUtils.py.
| def lsst.afw.cameraGeom.fitsUtils.HeaderMap.addEntry | ( | self, | |
| keyname, | |||
| attribute_name, | |||
default = None, |
|||
transform = lambda x: x |
|||
| ) |
Adds an entry to the registry.
Parameters
----------
keyname : `str`
Key used to retrieve the header record.
attribute_name : `str`
Name of the attribute to store the value in.
default : `object`
Default value to store if the header card is not available.
transform : `callable`
Transform to apply to the header value before assigning it to the
attribute.
Definition at line 81 of file fitsUtils.py.
| def lsst.afw.cameraGeom.fitsUtils.HeaderMap.setAttributes | ( | self, | |
| obj, | |||
| metadata, | |||
doRaise = True |
|||
| ) |
Sets the attributes on the given object given a metadata object.
Parameters
----------
obj : `object`
Object on which to operate in place.
metadata : `lsst.daf.base.PropertySet`
Metadata object used for applying the mapping.
doRaise : `bool`
Raise exceptions on calling methods on the input object that
do not exist?
Definition at line 100 of file fitsUtils.py.
1.8.13