Skip to content
Novus Examples
fits7 KB

Intentionally Corrupt FITS — Short Final Block (.fits)

An intentionally corrupt FITS file whose header is complete and whose data unit is cut short, leaving a total length that is not a multiple of the mandatory 2880-byte block. A reader must report the short read rather than hand back a half-filled array padded with whatever it found.

Preview — schema + first 5 rowsfits
FieldValue
Damageintentionally corrupt — final data block cut short
File size7140 bytes
Multiple of 2880no — FITS requires every unit to be block-aligned
Headercomplete and valid; NAXIS still declares the full array
Expected behaviouran explicit short-read error, not a partially-filled array
Intentionally corrupt: the header promises more pixels than the file contains.

Specifications

Intentionally Corrupt
true
Damage
data unit truncated mid-block
Original Bytes
8640
Kept Bytes
7140
Multiple Of2880
false
Header Intact
true

Testing contract

Expected to fail
Scenario
Read the primary header, then attempt to read the full data array it declares.
Expected result
The header parses and reports a 16x24 float64 array, but the read fails with an explicit truncation or block-alignment error instead of returning an array padded with zeros.

What is a .fits file?

FITS (.fits, Flexible Image Transport System) is the standard binary format in astronomy. It pairs human-readable 80-character header cards (in 2880-byte blocks) with binary image or table data, storing pixel arrays, coordinates, and instrument metadata. It has been the astronomical archive format for decades.

How to use this file

Use an example .fits file to test FITS readers (astropy, CFITSIO, DS9), header-card parsing, and image or table extraction, or to verify block-alignment handling.

How to use this file for testing

“Intentionally Corrupt FITS — Short Final Block (.fits)” is a deterministic Novus Examples fixture for Scientific data, Error handling. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.

Documented properties for this file: damage: data unit truncated mid-block · intentionally corrupt. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.

Generated by generation/scientific.py. Free for any use, no attribution required — license.