Code Monkey home page Code Monkey logo

pyxtf's Introduction

pyxtf

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 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.

pyxtf's People

Contributors

oysstu avatar

Stargazers

pengbo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.