{ } Raw JSON

bundles / astropy latest / astropy / io / fits / _utils / parse_header

cython_function_or_method

astropy.io.fits._utils:parse_header

Signature

def   parse_header ( fileobj )

Summary

Fast (and incomplete) parser for FITS headers.

Extended Summary

This parser only reads the standard 8 character keywords, and ignores the CONTINUE, COMMENT, HISTORY and HIERARCH cards. The goal is to find quickly the structural keywords needed to build the HDU objects.

The implementation is straightforward: first iterate on the 2880-bytes blocks, then iterate on the 80-bytes cards, find the value separator, and store the parsed (keyword, card image) in a dictionary.

Aliases

  • astropy.io.fits._utils.parse_header