FITS (Flexible Image Transport System) is the standard file format used in astronomy to store pixel data alongside metadata. This metadata is organized into 80-character strings called cards within the FITS header, containing a keyword, a value, and a comment.
Because data is often generated across various telescopes, capture software, and pipelines, minor non-compliance with the official FITS standard is incredibly common. Common FITS Header Errors 1. Structural and Formatting Violations
Missing END Card: The FITS standard requires headers to terminate explicitly with an END card. If a file is cut short or improperly saved, software like Astropy will throw an OSError: Header missing END card.
Lowercase Exponential Notation: The standard mandates uppercase E for floating-point scientific notation (e.g., 1.23E11). Capture tools frequently write lowercase letters instead (e.g., 1.23e11), causing parsing warnings.
Invalid Characters in Keywords: Keywords must contain only uppercase letters, digits, hyphens, and underscores. Software sometimes accidentally injects spaces, periods, or lowercase letters.
Keyword Length Violations: Keywords must be exactly 8 characters or fewer. Overlength keywords violate the core format unless explicitly prefixed with the HIERARCH convention. 2. Coordinate and Coordinate System (WCS) Errors FITS File Handling (astropy.io.fits)
Leave a Reply