HDF5 Compound Record dtype — Mixed Field Types (.h5)
A compound-dtype dataset mixing an integer key, two float measurements, a fixed-width byte string and a boolean flag in a single record. It is the fixture for readers that must map an HDF5 record type onto a native struct without reordering or repadding the fields.
| Field | dtype | Example |
|---|---|---|
| sample_id | int32 | 1 |
| mass_g | float64 | 12.025971 |
| u_mass_g | float64 | 0.0025 |
| operator | S8 (fixed 8-byte ASCII) | SYNTH-A |
| passed | bool | True |
Specifications
- Records
- 10
- Fields
- 5
- Field Types
- int32, float64, float64, 8-byte ASCII, bool
- Itemsize
- 29
- Seed
- 20260818
- Unit Attribute
- units_mass_g = g
Testing contract
Expected to pass- Scenario
- Read the measurements dataset and access each named field, checking the reported item size of the compound type.
- Expected result
- Ten records come back, one record occupies 29 bytes, operator decodes as fixed 8-byte ASCII rather than a variable-length string, and passed is a real boolean not an int8.
What is a .h5 file?
HDF5 (.h5) is a binary container format for large, heterogeneous scientific data. It stores multidimensional arrays (datasets) in a hierarchical group structure with attributes and chunked, compressed storage, and is standard in ML, physics, and geoscience.
How to use this file
Use an example .h5 file to test HDF5 readers (h5py, PyTables), group and dataset traversal, and attribute extraction.
How to use this file for testing
“HDF5 Compound Record dtype — Mixed Field Types (.h5)” is a deterministic Novus Examples fixture for Scientific data, Serialization testing, Data import. 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: seed 20260818 · 10 records · 5 fields. 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.
Related files
- fitsFITS BINTABLE — Typed Columns with TUNIT (.fits)A FITS binary table with four typed columns, big-endian numerics packed with no inter-field padding and TUNIT declaring milli-jansky on the two flux columns. It is the fixture for a table reader that has to build a row struct from TFORM codes rather than guess widths.

- npyNumPy .npy — Structured Record Array with Units in Field Names (.npy)A 16-record structured array carrying a value, its uncertainty and a quality flag, with the physical unit encoded in the field-name suffix because .npy has nowhere else to put it. The header descriptor is a list of field tuples rather than a single type string, which is the parsing branch this file exercises.

- h5HDF5 Chunked + gzip + shuffle Filters (.h5)One array stored twice in the same file: chunked with the shuffle and gzip filters applied, and contiguous with no filters at all. Comparing the two proves a reader ran the HDF5 filter pipeline rather than reading raw chunk bytes.

- h5HDF5 Deeply Nested Group Tree — Eight Levels (.h5)Eight levels of nested groups, each holding a dataset whose values equal its own depth. Any tree walk that caps recursion depth or flattens names silently loses the lower levels, and the depth-valued arrays make that immediately visible.

- h5HDF5 Dimension Scales Attached to a 3-D Array (.h5)The CF NetCDF grid expressed with HDF5's own dimension-scale mechanism, so each axis of the 3-D array points at a real coordinate dataset through DIMENSION_LIST references. It lets a reader be tested on scale resolution instead of on filename conventions.

- h5HDF5 Experiment Hierarchy — raw, processed, metadata (.h5)A three-group HDF5 file laid out the way a real bench run is — raw arrays, a processed derivative that names its source in a derived_from attribute, and a metadata group — with units on every dataset. It is the walk-the-tree fixture: a reader has to recurse rather than assume a flat namespace.

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