File format reference

This page explains the format of data files saved from Exploration Tool using the GUI or recording module.

The data files store a Record, a simple key-value store containing the fields shown further down. Either HDF5 .h5 or NumPy .npz can be used to save it, although HDF5 is preferred due to its wider compatibility across systems and languages.

We recommend loading and saving records using the load and save functions in the acconeer.exptool.recording module. These functions take care of packing and unpacking the Record fields on save and load respectively. See utils/load_record.py for an example of loading data, and examples/record_data/barebones.py for saving data.

For an example of how to load HDF5 records in Matlab, see utils/load_record_h5.m.

Examples of loading

Some minimal examples of loading the session info from a data file:

Using acconeer.exptool.recording.load (recommended):

import acconeer.exptool as et
record = et.recording.load("data.h5")  # or .npz
print(record.session_info)
# {'data_length': 1238, 'range_length_m': 0.6, ...

Using h5py:

import json
import h5py
with h5py.File("data.h5") as f:
   print(json.loads(f["session_info"][()]))
# {'data_length': 1238, 'range_length_m': 0.6, ...

Using numpy:

import json
import numpy as np
with np.load("data.npz") as f:
   print(json.loads(str(f["session_info"])))
# {'data_length': 1238, 'range_length_m': 0.6, ...

Fields

The type here refers to the packed type - the type the value has in the stored file.

Other

The following optional fields are used for storing other metadata for the recording.

rss_version

Type: string

The server/RSS version used on the host (module, RPi, etc.).

lib_version

Type: string

The Exploration Tool library version used on the PC.

timestamp

Type: string

ISO formatted time at the start of recording. For example "2020-12-31T23:59:59".

sample_times

Type: 1D array of floats

The time in seconds for every return of a sweep/frame from get_next. Typically timed using Python’s time.time, meaning it will be the time since the epoch.

Caution

Since this is timed on the client side, the timing may significantly differ from the timing when the radar actually sampled the data. Thus, we recommend only using this for calculating average sampling rate.

note

Type: string

Free text field. Not used by Exploration Tool itself.

Legacy

The following optional fields are used by legacy components of Exploration Tool.

legacy_processing_config_dump

Type: string

A JSON dump of a legacy processing configuration.