A python module to access binary data files generated by Teledyne WebbResearch gliders
Project description
DBDREADER
Synopsis
Slocum ocean gliders are autonomous underwater vehicles, used for making oceanographic measurements. The data that these devices and their sensors collect, are stored in binary data files. The python module dbdreader provides the utilities to extract the data from the binary files, so that they can be further analysed.
Installation
The python module dbdreader can be installed from source, using the standard method to install python code. Note that this method requires an C-extension to be build. (The actual reading from files is done in C for speed.) In order to build the extension successfully, you would need a C-compiler. On Linux, this can be gcc, with supporting development/header files for python. On Fedora you would do sudo dnf install python3-devel.
Alternatively, dbdreader can also be installed from PyPi, using pip3 install dbdreader.
Documentation
Comprehensive documentation is provided at https://dbdreader.readthedocs.io/en/latest/
Quick-start
For the impatient…
The dbdreader module implements a class DBD() which provides the machinery to read a single dbd file. The most commonly used methods are:
get(parametername)
get_sync(parametername, list_of_other_parameternames)
The first method returs a tuple with time and values for requested parameter. The second method, returns a tuple with time and values of the first parameter requested, and of all further listed parameters, all interpolated on the time base of the first parameter.
Mostly, it is not one file that is required to be processed, but a number of them. This interface is implemented by the MultiDBD class. Files can either be specified as a list of filenames, or as a pattern using wildcards.
Examples
To read a single file:
>>> dbd = DBD("00010010.dbd") >>> t, pitch = dbd.get("m_pitch") >>> t, hdg, ptch, roll = dbd.get_sync("m_heading", "m_pitch", "m_roll)
Or, doing the same, but using both dbd and ebd files:
>>> dbd = DBD(pattern="00010010.[de]bd") >>> t, pitch = dbd.get("m_pitch") >>> t, hdg, ptch, roll = dbd.get_sync("m_heading", "m_pitch", "m_roll") >>> t, p_ctd, p_nav = dbd.get_sync("sci_water_pressure", "m_water_pressure")
Python 2
Python 2.7 is not supported anymore. However, you should be able to make the code able to run on python2.7 using the future package.
pip install future
pasteurize dbdreader.
For details see http://python-future.org/pasteurize.html.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dbdreader-0.4.1.tar.gz
.
File metadata
- Download URL: dbdreader-0.4.1.tar.gz
- Upload date:
- Size: 531.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0c1b83e5089665de3ad88216c7a210f132463d456685e246fdef3b28c4f5a87 |
|
MD5 | 1c55ae636e1f2563f880f5c35712846a |
|
BLAKE2b-256 | 68da507cfcdd0da07ca5a9208d66bd1afe49cf21f4d4158e665ae300be5b45a9 |
File details
Details for the file dbdreader-0.4.1-py3.7-linux-x86_64.egg
.
File metadata
- Download URL: dbdreader-0.4.1-py3.7-linux-x86_64.egg
- Upload date:
- Size: 59.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770ebbffb0b3d253fe1c6380d8982df720861c02dbaa7dca6aa39054ec0291dc |
|
MD5 | 0adaede6b2b5559828174ee032456504 |
|
BLAKE2b-256 | f9f2b7694c67d907361a71d1d0d6d6767050f619c6722d41869ecb55ac8feff4 |