File format reference - A121#
This page explains the format of A121 data files saved from Exploration Tool using the application or recorders in the API.
A121 records are currently only stored in HDF5 (.h5).
Tip
We recommend loading and saving records using the built in functions in the acconeer.exptool.a121 module.
See examples/a121/load_record.py for an example of loading data, and examples/a121/record_data/barebones.py for saving data. For an example of how to load HDF5 records in Matlab, see examples/a121/load_record_h5.m.
Examples of loading#
Some minimal examples of loading the session config from a data file:
Using acconeer.exptool.a121.load_record() (recommended):
from acconeer.exptool import a121
record = a121.load_record("data.h5")
print(record.session_config)
# SessionConfig:
# extended ............... False
# ...
Using h5py:
import json
import h5py
with h5py.File("data.h5") as f:
print(json.loads(f["session/session_config"][()]))
# {'groups': [{'1': {'sweep_rate': None,
# 'frame_rate': None,
# ...
HDF5 structure#
client_infoJSON string representation of
ClientInfo.generationString containing the sensor generation, i.e., “a121”.
lib_versionString containing the Exploration Tool version used to record.
server_infoJSON string representation of
ServerInfo.sessionA soft link to
sessions/session_0. Used for backwards-compatibility.sessions/session_XHDF5 group containing all data related to the recorded session. X is an integer starting from 0.
group_Y/entry_Z/HDF5 group for entry Z in configuration group Y. Y and Z are integers starting from 0.
result/HDF5 group with a dataset for every field in the
Result.Results are “stacked” into
StackedResultsto form the datasets. For example, the boolean scalar (single value)data_saturatedbecomes a 1D boolean array. In aRecord, these can be accessed viastacked_results.frame3D array with dimensions (frame, sweep, distance) of the original complex data from the session.
The data type is a structured type with fields
realandimag, both 16 bit signed integers (int16).Note
Not the same type as
frame.data_saturated1D boolean array with dimension (frame) of the
data_saturatedflags....See fields in
Result.
metadataJSON string representation of
Metadata.sensor_idInteger representing the sensor ID.
Note
Within a group, the sensor ID is unique for every entry.
session_configJSON string representation of
SessionConfig.
timestampString containing an ISO 8601 formatted timestamp at the time of creating the
H5Recorder.uuidString containing a randomly generated version 4 UUID.