Skip to content
Novus Examples
h56.3 KB

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.

Preview — schema + first 5 rowsh5
FielddtypeExample
sample_idint321
mass_gfloat6412.025971
u_mass_gfloat640.0025
operatorS8 (fixed 8-byte ASCII)SYNTH-A
passedboolTrue
One compound record is 29 bytes; field order and padding are part of the contract.

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.

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