Skip to content
Novus Examples
fits5.6 KB

FITS Image — BITPIX 16 with BZERO Unsigned Trick (.fits)

FITS has no unsigned 16-bit type, so unsigned data is stored signed with BZERO = 32768 and recovered as BZERO + BSCALE * stored. Every stored value in this image is negative, so a reader that ignores the scaling returns an entirely negative frame while parsing the file perfectly.

Preview — schema + first 8 rowsfits
FieldValue
BITPIX16 (signed, big-endian)
BZERO32768
BSCALE1
Rulephysical = BZERO + BSCALE * stored
Stored [0,0]-30368
Physical [0,0]2400
Stored range-30368 to -1974 — all negative
Physical range2400 to 30794
FITS has no unsigned 16-bit type; BZERO is the standard workaround.

Specifications

Bitpix
16
Bzero
32768
Bscale
1
Stored Range
-30368 to -1974
Physical Range
2400 to 30794
Byte Order
big-endian
Every Stored Value Negative
true

Testing contract

Expected to pass
Scenario
Read the primary array and apply BZERO and BSCALE before comparing pixel values.
Expected result
Scaled values run from 2400 to 30794 and are all positive, whereas the raw stored array runs from -30368 to -1974 and contains no positive value at all.

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

“FITS Image — BITPIX 16 with BZERO Unsigned Trick (.fits)” is a deterministic Novus Examples fixture for Scientific data, Serialization testing. 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: FITS · 5,760 bytes. 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.