Base class functor to make a VisitInfo from the FITS header of a raw image
A subclass will be wanted for each camera. Subclasses should override
- setArgDict: the override can call the base implementation,
which simply sets exposure time and date of observation
- setDateAvg
The design philosophy is to make a best effort and log warnings of problems,
rather than raising exceptions, in order to extract as much VisitInfo information as possible
from a messy FITS header without the user needing to add a lot of error handling.
However, the methods that transform units are less forgiving; they assume
the user provides proper data types, since type errors in arguments to those
are almost certainly due to coding mistakes.
Definition at line 49 of file makeRawVisitInfo.py.
def lsst.obs.base.makeRawVisitInfo.MakeRawVisitInfo.getDateAvg |
( |
|
self, |
|
|
|
md, |
|
|
|
exposureTime |
|
) |
| |
Return date at the middle of the exposure
@param[in,out] md metadata, as an lsst.daf.base.PropertyList or PropertySet;
items that are used are stripped from the metadata
(except TIMESYS, because it may apply to more than one other keyword).
@param[in] exposureTime exposure time (sec)
Subclasses must override. Here is a typical implementation:
dateObs = self.popIsoDate(md, "DATE-OBS")
return self.offsetDate(dateObs, 0.5*exposureTime)
Definition at line 110 of file makeRawVisitInfo.py.
def lsst.obs.base.makeRawVisitInfo.MakeRawVisitInfo.popAngle |
( |
|
self, |
|
|
|
md, |
|
|
|
key, |
|
|
|
units = astropy.units.deg |
|
) |
| |
Pop an lsst.afw.geom.Angle, whose metadata is in the specified units, with a default of Nan
The angle may be specified as a float or sexagesimal string with 1-3 fields.
@param[in,out] md metadata, as an lsst.daf.base.PropertyList or PropertySet
@param[in] key date key to read and remove from md
@return angle, as an lsst.afw.geom.Angle; Angle(NaN) if the key is not found
Definition at line 177 of file makeRawVisitInfo.py.
def lsst.obs.base.makeRawVisitInfo.MakeRawVisitInfo.popIsoDate |
( |
|
self, |
|
|
|
md, |
|
|
|
key, |
|
|
|
timesys = None |
|
) |
| |
Pop a FITS ISO date as an lsst.daf.base.DateTime
@param[in,out] md metadata, as an lsst.daf.base.PropertyList or PropertySet
@param[in] key date key to read and remove from md
@param[in] timesys time system as a string (not case sensitive), e.g. "UTC" or None;
if None then look for TIMESYS (but do NOT pop it, since it may be used
for more than one date) and if not found, use UTC
@return date as an lsst.daf.base.DateTime; DateTime() if the key is not found
Definition at line 194 of file makeRawVisitInfo.py.
def lsst.obs.base.makeRawVisitInfo.MakeRawVisitInfo.popMjdDate |
( |
|
self, |
|
|
|
md, |
|
|
|
key, |
|
|
|
timesys = None |
|
) |
| |
Get a FITS MJD date as an lsst.daf.base.DateTime
@param[in,out] md metadata, as an lsst.daf.base.PropertyList or PropertySet
@param[in] dateKey date key to read and remove from md
@param[in] timesys time system as a string, e.g. "UTC" or None;
if None then look for TIMESYS (but do NOT pop it, since it may be used
for more than one date) and if not found, use UTC
@return date as an lsst.daf.base.DateTime; DateTime() if the key is not found
Definition at line 220 of file makeRawVisitInfo.py.
def lsst.obs.base.makeRawVisitInfo.MakeRawVisitInfo.setArgDict |
( |
|
self, |
|
|
|
md, |
|
|
|
argDict |
|
) |
| |
Fill an argument dict with arguments for VisitInfo and pop associated metadata
Subclasses are expected to override this method, though the override
may wish to call this default implementation, which:
- sets exposureTime from "EXPTIME"
- sets date by calling getDateAvg
@param[in,out] md metadata, as an lsst.daf.base.PropertyList or PropertySet;
items that are used are stripped from the metadata
(except TIMESYS, because it may apply to more than one other keyword).
@param[in,out] argdict a dict of arguments
Subclasses should expand this or replace it.
Definition at line 92 of file makeRawVisitInfo.py.