Compare
FITS vs HDF5
FITS is a standard for exchanging, analyzing, and archiving astronomy data, with headers and one or more Header/Data Units (HDUs). HDF5 is a general hierarchical container in which applications define data structures and meaning.
Which format should you choose?
Choose FITS for astronomy archives, observation data exchange, and FITS-aware tools. Consider HDF5 for flexible hierarchies of diverse arrays and related objects; check domain conventions and software support.
Good fit for FITS
Storing and exchanging astronomical and scientific images, spectra, and tables
- Combining multiple data units and metadata in one dataset
- Exchanging observational data between FITS-aware tools
Good fit for HDF5
Storing large scientific and technical data hierarchically · Keeping multidimensional arrays and related metadata in one container
- Organizing complex data with groups, datasets, and attributes
- Scientific workflows needing partial I/O or dataset-level compression
Basic information
| Field | FITS | HDF5 |
|---|---|---|
| Extension | .fits, .fit, .fts | .h5, .hdf5 |
| MIME type | application/fits | |
| Common uses | Storing and exchanging astronomical and scientific images, spectra, and tables | Storing large scientific and technical data hierarchically · Keeping multidimensional arrays and related metadata in one container |
| How to open | Use an astronomy viewer, analysis program, or scientific library that supports FITS. If the file contains several HDUs, inspect extensions as well as the primary HDU, and verify coordinates, units, data type, and missing-value handling. | Use HDF5-capable visualization or analysis software or a library. Inspect the group hierarchy, dataset shapes and types, attributes, and filters. Consult the creator's documentation because applications may define their own HDF5 conventions. |
| Export or convert | When converting to an image, table, or another scientific format, check whether coordinate systems, units, observation metadata, and extra HDUs are preserved. Keep the original FITS and compare scientific values and positions after conversion. | Before converting to CSV, Parquet, FITS, or another format, decide how to map hierarchy, array dimensions and types, attributes, units, and coordinates. Some structures or metadata may not fit the target; keep the original and compare values and metadata. |
Choose by use case
Combining multiple data units and metadata in one dataset
Storing and exchanging astronomical and scientific images, spectra, and tables
FITSExchanging observational data between FITS-aware tools
Storing and exchanging astronomical and scientific images, spectra, and tables
FITSOrganizing complex data with groups, datasets, and attributes
Storing large scientific and technical data hierarchically · Keeping multidimensional arrays and related metadata in one container
HDF5Scientific workflows needing partial I/O or dataset-level compression
Storing large scientific and technical data hierarchically · Keeping multidimensional arrays and related metadata in one container
HDF5Key point 1
FITS standardizes HDUs, keyword headers, image arrays, and tables; HDF5 provides groups, datasets, and attributes for application-defined structures.
More on the differencesKey point 2
FITS is widely used to transport, analyze, and archive astronomy data. HDF5 is a general model for varied scientific and technical data.
More on the differencesMore on the differences
Prefer FITS when interchange with astronomy archives and established FITS software is central. Consider HDF5 when an application needs a flexible hierarchy of heterogeneous data. Verify the tools and conventions used by collaborators.
- FITS defines standardized HDUs, headers, image arrays, and table extensions. HDF5 provides a hierarchical data model whose application-specific meaning is defined by users.
- FITS is a common astronomy interchange and archival format. HDF5 is a general-purpose container used across scientific and technical fields.
- During conversion, validate units, coordinate systems, time, scaling, table columns, extensions, and HDF5 attributes or links. Metadata and conventions do not necessarily map automatically.
Frequently asked questions
Is HDF5 a drop-in replacement for FITS in astronomy?
No. Applications and archives may expect FITS structure and conventions. Conversion requires checking metadata, coordinates, units, and tool support.