MakeRawVisitInfoViaObsInfo¶
- class lsst.obs.base.MakeRawVisitInfoViaObsInfo(log=None, doStripHeader=False)¶
Bases:
objectBase class functor to make a VisitInfo from the FITS header of a raw image using
ObservationInfotranslators.Subclasses can be used if a specific
MetadataTranslatortranslator should be used.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.
- Parameters:
- log
logging.Loggeror None Logger to use for messages. (None to use
Log.getLogger("lsst.obs.base.makeRawVisitInfoViaObsInfo")).- doStripHeader
bool, optional Strip header keywords from the metadata as they are used?
- log
Attributes Summary
Header translator to use to construct VisitInfo, defaulting to automatic determination.
Methods Summary
__call__(md)Construct a VisitInfo and strip associated data from the metadata.
observationInfo2visitInfo(obsInfo[, log])Construct a
VisitInfofrom anObservationInfo.Attributes Documentation
- metadataTranslator: ClassVar[MetadataTranslator | None] = None¶
Header translator to use to construct VisitInfo, defaulting to automatic determination.
Methods Documentation
- __call__(md)¶
Construct a VisitInfo and strip associated data from the metadata.
- Parameters:
- md
lsst.daf.base.PropertyListorlsst.daf.base.PropertySet Metadata to pull from. May be modified if
stripHeaderisTrue.
- md
- Returns:
- visitInfo
lsst.afw.image.VisitInfo VisitInfoderived from the header using aMetadataTranslator.
- visitInfo
- static observationInfo2visitInfo(obsInfo, log=None)¶
Construct a
VisitInfofrom anObservationInfo.- Parameters:
- obsInfo
astro_metadata_translator.ObservationInfo Information gathered from the observation metadata.
- log
logging.Loggerorlsst.log.Log, optional Logger to use for logging informational messages. If
Nonelogging will be disabled.
- obsInfo
- Returns:
- visitInfo
lsst.afw.image.VisitInfo VisitInfoderived from the suppliedObservationInfo.
- visitInfo