Function lsst::afw::geom::detail::readFitsWcs

Function Documentation

std::shared_ptr<ast::FrameSet> lsst::afw::geom::detail::readFitsWcs(daf::base::PropertySet &metadata, bool strip = true)

Read a FITS convention WCS FrameSet from FITS metadata

The resulting FrameSet may be any kind of WCS supported by FITS; if it is a celestial WCS then 1,1 will be the lower left corner of the image (the FITS convention, not the LSST convention).

This routine replaces RADECSYS with RADESYS if the former is present and the latter is not, since that is a common misspelling in FITS headers.

The returned FrameSet will have an IWC (intermediate world coordinate system) frame.

Parameters
  • [inout] metadata: FITS header cards

  • [in] strip: If true: strip items from metadata used to create the WCS, such as RADESYS, EQUINOX, CTYPE12, CRPIX12, CRVAL12, etc. Always keep keywords that might be wanted for other purpposes, including NAXIS12 and date-related keywords such as “DATE-OBS” and “TIMESYS” (but not “EQUINOX”).

Exceptions
  • pex::exceptions::TypeError: if the metadata does not contain a FITS-WCS