On this page
Validate 80-character cards and 2880-byte HDU boundaries
Record a neutral file ID, digest, file offset, header block count, data block count, and the reader version. The HEASARC, (opens in a new tab) says headers consist of 80-character keyword records and that headers and data are padded to exact 2880-byte multiples. A parser that finds END but skips padding can begin the next HDU at the wrong offset.
The NASA FITS source record carries the verified Version 4.0 date 13 August 2018. The HEASARC overview uses 22 October 2026 as retrieval evidence because no publication date is asserted; that checked day is not a publication claim.
| Boundary evidence | Record | Stop if |
|---|---|---|
| Card width | 80-character card spans | Card boundaries depend on line wrapping |
| END card | Position and trailing card bytes | END is missing or has a value field |
| Header padding | Blank cards to the block boundary | Padding is treated as a data card |
| Data span | Expected bytes from BITPIX and axes | Data reaches beyond the file |
| HDU start | Offset and source sequence | Reader skips an extension |
| HDU count | Observed and parsed count | A truncated tail is ignored |
Keep a raw card snapshot and a normalized table. If a library repairs nonstandard spacing or accepts a truncated header, record the repair and do not present the normalized header as the source bytes.
Match BITPIX, NAXIS, and every axis length
The NASA Science Office of Standards and Technology, (opens in a new tab) requires the mandatory primary cards in order. Record SIMPLE or XTENSION, BITPIX, NAXIS, every NAXISn card in sequence, PCOUNT and GCOUNT where an extension requires them, and the computed raw data size. For an ordinary primary array or standard image extension, a zero-length axis means no data follows. Check GROUPS = T, NAXIS1 = 0, PCOUNT, GCOUNT, and the random-groups data rule before applying that shortcut.
| Card | Record | Interpretation boundary |
|---|---|---|
| SIMPLE or XTENSION | HDU kind and conformance claim | Claim is not independent validation |
| BITPIX | Signed value and byte width | Type is not calibration or unit |
| NAXIS | Number of axes | Rank is not scientific meaning |
| NAXISn | Length for each ordered axis | Shape is not coverage |
| GROUPS | Random-groups marker and scope | NAXIS1 = 0 is treated as no data without checking GROUPS |
| PCOUNT and GCOUNT | Extension-specific counts | Defaults are applied without record |
| END | Card position and block padding | Reader ends at a non-card boundary |
Synthetic HDU ledger
{"hdu":"fixture-primary","header":{"simple":"fixture-boolean","bitpix":"fixture-type","naxis":"fixture-rank","naxisn":["fixture-axis-1","fixture-axis-2"],"end":"fixture-card"},"data":{"expected_bytes":"fixture-product-times-width","state":"not-read"}}Keep optional metadata, scaling, and missing values explicit
Optional cards may describe units, dates, coordinate systems, scaling, blank values, comments, and history. Record keyword, value type, exact source text, normalized value, and whether it affects the data read. Do not treat a card named BUNIT, DATE, CRVAL, or BSCALE as proof that values have the intended physical meaning. A scaled display value is a derivative of stored pixels.
| Metadata field | Record | Stop if |
|---|---|---|
| BSCALE and BZERO | Stored type and scaling formula | Stored values are replaced in the report |
| BLANK or missing state | Value and scope | Blank becomes numeric zero |
| BUNIT | Exact unit string and source | Unit is inferred from keyword spelling |
| WCS cards | Axis and transform fields | Coordinate system is assumed |
| DATE and history | Raw values and card positions | Time precision is normalized silently |
| COMMENT and HISTORY | Presence and bounded summary | Private notes enter the packet |
Reconcile extensions and array evidence
The FITS overview lists image, ASCII table, and binary table extensions. Inventory each HDU, extension name, version, schema cards, data size, and link to the previous or next unit. Compare declared shape and type with a bounded read or table schema, but keep sampled observations separate from the full array claim.
| Comparison | Record | Hold when |
|---|---|---|
| Header to data size | Expected and observed byte spans | Padding or PCOUNT is unresolved |
| HDU sequence | Primary and extension order | An extension is omitted from export |
| Axis metadata | Names, units, and shape | Axis order changes in a reader |
| Array sample | Synthetic or bounded sample only | Sample is presented as full coverage |
| Table columns | TTYPE, TFORM, and row width | Row size does not match data span |
| Round trip | Changed cards and bytes | Writer rewrites source metadata silently |
Stop before interpreting pixels or tables
Stop conditions
- Stop if card width, END, padding, HDU offset, or data span is inconsistent.
- Stop if BITPIX, NAXIS, NAXISn, PCOUNT, or GCOUNT cannot be matched to the data unit, including the random-groups exception.
- Stop if scaling, blank values, units, dates, or WCS cards are normalized without source text.
- Stop if an extension is skipped, a table row width differs, or an array sample is treated as coverage.
- Stop if a reader repairs the header and the original bytes are not retained.
- Stop before opening real pixels when headers expose private locations, project names, or notes.
Pair this worksheet with the data provenance log for file and transform history and the data card template for collection context. A conforming header does not prove calibration, completeness, ownership, privacy clearance, or permission.
For a supported non-health collection, after the owner has authority to describe the scope and a controlled metadata packet, the qualified physical-data appraisal request path may be a preparation step. It does not read FITS arrays, interpret astronomy, assess calibration, create a quote, match a buyer, or grant a license.