Reading recorded data

Reading recorded data

Syntalos will store all data recorded with it in a defined directory structure, called “EDL” (Experiment Directory Layout).

Data can be read manually without specialized tools, but to make things easier we also provide the edlio Python module which can load EDL directories and also apply any timestamps stored in binary tsync files to their respective data automatically. You can install it via pip: pip install edlio.

If you just want to convert any tsync binary files to their text representations, the syntalos-metaview command-line tool can help you with that.

An EDL directory tree
An EDL directory tree as generated by Syntalos

Reading EDL data with edlio and Python

The edlio module is a versatile Python module for loading EDL data from Python. Video data will be loaded using OpenCV, while it will use Neo to load electrophysiology formats. You can install it from PyPI: pip install edlio

More information is available in the edlio documentation. The documentation also contains example code on how to read data with the Python module in the most common scenarios.

Reading recorded data without edlio

Data stored with Syntalos is just files. You can load them with a text editor, video player, data viewer, etc. without any specialized tools. This will be slightly less convenient, but should not be difficult to implement for your own data management workflow.

The TOML metadata files can also be read easily from many languages, for example Python supports reading the data natively via tomllib and has tomlkit for more advanced reading & writing, while a MATLAB toolbox is available as well.

Using this, you can read EDL metadata from any language and in any way you like.

Convert tsync files to text

Syntalos’ tsync files can be read using the edlio Python module and can be converted into metadata and NumPy matrices for further processing. This is the best way to use them.

However, if you just want to quickly transform the binary data into its textual representation, you can also use the syntalos-metaview command-line tool:

If you installed Syntalos from source/package:

syntalos-metaview --tsync /path/to/your/tsync-file.tsync

If you installed Syntalos from the software store:

flatpak run --command=syntalos-metaview org.syntalos.syntalos --tsync /path/to/your/tsync-file.tsync

The tool will then print a CSV-like representation of the data, preceded by the metadata the tsync file contains.