Skip to main content

eXtended Triton Format (XTF) file interface

Project description

pyxtf

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

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 setup.py install
Dependencies

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

Usage
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)
print(sonar_packets[0])

Examples can be found in the examples directory on github.

Contribution

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.5.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyxtf-1.5.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file pyxtf-1.5.0.tar.gz.

File metadata

  • Download URL: pyxtf-1.5.0.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyxtf-1.5.0.tar.gz
Algorithm Hash digest
SHA256 a7960b64d13b810b69b08fff1117cc2dbf204575ddc97027f8e3f727e7b5f977
MD5 3e1e11a2fedeb06f82f760f2f09830d8
BLAKE2b-256 d05d68a83eefe5801349fa281c11d170de57022ae0f6b9db1895d7ba106773a3

See more details on using hashes here.

File details

Details for the file pyxtf-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pyxtf-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyxtf-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dc964ba40d2630e04534a65b05f682b0f0dacb27b7c8be29ca83441023a9576
MD5 fbbdfa672980c2312d6f0014aff0ed95
BLAKE2b-256 7faaa9892938e7a591f4fa131b262cc22cb28d78a6626fc8450b6158efbbf5f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page