Installation

DOLfYN can be installed using pip:

$ pip install dolfyn

Or, if you would like download the source code locally so that you can modify it, you can clone the repository and then use pip to install it as an ‘editable’ package:

$ git clone https://github.com/lkilcher/dolfyn.git
$ cd dolfyn
$ pip install -e .

Once installed, to create documentation (you may have to pip install sphinx_rtd_theme):

$ cd dolfyn/docs
$ make html

If you would like to contribute, please follow the guidelines in the contributing.md file.

Data Files and Test Files

DOLfYN has several moderately large (a few MB each) binary data files included with the repo. These are example data files, and test-data files used to confirm that the repository is functioning correctly. In order to keep the size of the source repository minimal, these data files are actually stored using GitHub’s git-lfs tools.

This means that if you want to be able to load these example data files, or run the tests, you will need to install git-lfs. If you cloned the repository prior to installing git-lfs, run the command git lfs fetch after installing git-lfs to pull the files.

MATLAB Users

For users who want to use DOLfYN’s file reading capabilities with minimal Python scripting, the binary2mat.py script can be used. So long as DOLfYN has been installed properly, you can use this script from the command line in a directory which contains your data files:

$ python binary2mat.py vector_data_imu01.vec

And DOLfYN will save the converted .mat file to your working directory, where raw data is stored into a 2-layer MATLAB structure.

Testing

Currently all testing is housed in the tests/ folder (including the data files). To run the tests, you’ll need to install pytest, then open a command prompt and run:

$ python -m pytest

If any of the tests do not pass, first confirm that you have installed all of the dependencies correctly, including git-lfs, then check to see if others are having a similar issue before creating a new one.

Dependencies

DOLfYN was originally built upon the h5py package and has since been refactored to build off xarray to make use of the netCDF data format. Support is upheld for python 3.6 onward.