Warning
This package is deprecated and will no longer receive updates.
Please migrate to the new harp-data package from Harp Python, which supersedes this one with an improved API and continued support.
A migration guide covers the transition.
A low-level interface to data collected with the Harp binary protocol.
The source code is currently hosted on GitHub.
Binary installers for the latest released version are available at the Python Package Index (PyPI) and can be installed using pip.
pip install harp-pythonThe list of changes between each release can be found here.
The interface makes use of a Pydantic data model generated from Harp device schema definitions. The schema data classes are used to automatically generate binary readers for each device.
All binary data files from a single device need to be stored in the same folder alongside the device meta-schema, named device.yml. Each register file should have the following naming convention <deviceName>_<registerAddress>.bin.
For example, for a dataset collected with a Behavior device, you might have:
📦device.harp
┣ 📜Behavior_0.bin
┣ 📜Behavior_1.bin
...
┗ 📜device.yml
import harp
reader = harp.create_reader("device.harp")reader.OperationControl.read()reader.OperationControl.register.addressreader = harp.create_reader("device.harp", epoch=harp.REFERENCE_EPOCH)reader.OperationControl.read(keep_type=True)reader.OperationControl.read("data/Behavior_10.bin")