multicolorfits.McfHeader#
- class multicolorfits.McfHeader(header=None, normalize=True, force_2d=True)[source]#
A stateful wrapper around an
astropy.io.fits.Header.- Parameters:
header (astropy.io.fits.Header, McfHeader, str, dict, or None) – Source header.
Noneyields a minimal placeholder header.normalize (bool) – Float-coerce WCS cards (
force_header_floats) and integer-coerceNAXIS/WCSAXES(normalize_wcs_meta) on construction.force_2d (bool) – Strip >2D structure cards (
force_header_2d) whenNAXIS > 2.
Methods
__init__([header, normalize, force_2d])copy()fromstring(text[, sep])fromtextfile(path, **kwargs)Load an
McfHeaderfrom a plain-text header file.get(key[, default])keys()matches_grid(other[, rtol])True if
othershares this header's pixel grid (shape + WCS), so the two images can be combined without reprojection.minimal_wcs_header()A stripped-down
astropy.io.fits.Headercontaining only the cards needed to define the pixel grid -- the celestial WCS plusNAXIS,NAXIS1andNAXIS2.set(*args, **kwargs)to_frame([frame])Return a new
McfHeaderdescribing the same sky area in a different celestial frame (wrapsskyframes.convert_header_frame).tostring([sep])totextfile(path[, overwrite])Write this header to a portable plain-text
.hdrfile.Attributes
astropyThe underlying
astropy.io.fits.Header(for the functional API).frameCached celestial frame name (e.g.
'fk5','galactic').is_celestialTrue if the header defines a usable celestial WCS.
pixscale_asecPixel scale in arcsec/pixel, or
Noneif undefined/anisotropic.shapeImage shape
(ny, nx)from NAXIS2/NAXIS1, orNone.wcsCached celestial
astropy.wcs.WCSbuilt from this header.