peek_array
Read a small slice from an HDF5 dataset to inspect raw values when SQL-based tools are unavailable. Get dtype, shape, sample data, units, and valid range.
Instructions
Read a small slice from one HDF5 dataset (the missing companion to check_arrays).
HDF5 sources don't have SQL views, so `sample_rows` / `run_sql` can't
inspect them. Use this to read raw values.
`path` accepts either:
- an absolute h5py path like `/gdb11_s08/molecule_1/coordinates`, or
- a leaf name like `coordinates`, which resolves to the first match
and reports other matching paths in `other_matches`.
`n` controls how many rows along the leading axis to return (default 5;
capped at ~500 values total for payload safety).
Output: dtype, full shape, returned slice shape, JSON-safe values,
plus `units` and `valid_range` if declared as HDF5 attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| path | Yes | ||
| source_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||