viewhack

Open a FITS astronomy image or table, stretch it, and save it as PNG

Drop a .fits, .fit, .fts or .fz file from an astro camera, a capture program or a telescope archive. See every header card, the image stretched so faint detail shows, in colour when it is a one-shot-colour raw frame, the value of any pixel, and tables as rows you can save as CSV.

The file is read by this tab on your device. Nothing is uploaded, so a night's frames stay yours.

What it shows

Saving

The formats, and what this reads in each

Images (primary HDU and IMAGE extensions)
BITPIX 8 (unsigned bytes), 16, 32 and 64 (signed integers) and −32, −64 (IEEE floats), big-endian as the standard requires, with BZERO, BSCALE and BLANK. One-dimensional data (a spectrum) is drawn as a strip and saved as a CSV of index and value.
Tile-compressed images (.fz)
What fpack, astropy and many archives write: the image cut into tiles (usually one row each), each compressed and stored in a binary table. RICE_1 (the default, typically 2 to 3 times smaller for 16-bit camera frames) is decoded by viewhack's own Rice decoder; GZIP_1 and GZIP_2 with the bundled fflate library. Floating-point images quantised with ZSCALE and ZZERO, including SUBTRACTIVE_DITHER_1 and _2, are restored as the convention describes. HCOMPRESS_1 and PLIO_1 are recognised and named; this page cannot draw them yet.
Gzipped files (.fits.gz)
A whole FITS file compressed with gzip, the way SDSS, Pan-STARRS and many survey archives serve them, is unpacked in the tab first.
Random groups
The old radio-interferometry layout (GROUPS = T) is recognised and its header shown; the groups are not unpacked.

Which way is up

The FITS standard counts rows from the bottom, so this page draws row 1 at the bottom, as SAOImage DS9 does. Many capture programs write rows top-first instead and say so with ROWORDER = 'TOP-DOWN'; such frames are drawn top-first. Untick the box under the controls to flip any image. The Bayer pattern is applied to the pixels in the order they are stored, which is what NINA, SharpCap and ASIAIR mean by it; if a frame comes out with red and blue swapped, choose the pattern one row down (RGGB and GBRG, or BGGR and GRBG).

What this cannot do

A .fit from a sports watch?

Garmin, Wahoo, COROS and other watches and bike computers also save files named .fit, in an unrelated format called Flexible and Interoperable Data Transfer. viewhack tells them apart by their first bytes: a watch file opens in the GPS track viewer, an astronomy file here.