Skip to main content

eXtended Triton Format (XTF) file interface

Project description


A python library for reading eXtended Triton Format (XTF) files (revision 44)

Installation from pypi
pip3 install pyxtf
Installation from source

Clone or download the repository and run the following command. This requires setuptools to be installed.

python3 install

The project depends on setuptools and numpy. Matplotlib is used for plotting, but is not required for basic functionality.

import pyxtf

input_file = 'yourfile.xtf'
(file_header, packets) = pyxtf.xtf_read(input_file, verbose=True)

The file_header is of type XTFFileHeader, which is a c-structure that starts off every XTF file. The packets object is a dictionary of the packets that follow the file header. The key is of type XTFHeaderType, which is an enumerated class. The value is a list of objects that belong to that type of header type. E.g usage might look as the following.

# Retrieve a list of all sonar packets
sonar_packets = packets[pyxtf.XTFHeaderType.sonar]

# Print the first sonar packet (ping)

Examples can be found in the examples directory on github.


If you find an XTF-file that does not work, either submit a patch or new packet type, or be prepared to send an example XTF-file when submitting the bug-report.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxtf-1.2.tar.gz (23.3 kB view hashes)

Uploaded source

Built Distribution

pyxtf-1.2-py3-none-any.whl (26.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page