About

This Python3 code aids in analyzing raw measurements with an Acoustic Doppler Velocimeter (ADV) producing *.vno and *.vna files. It detects and removes spikes according to Nikora and Goring (1998) and Goring and Nikora (2002).

The code was originally developed in Matlab(R) at the Nepf Environmental Fluid Mechanics Laboratory (Massachusetts Institute of Technology).

Important

*.vno and *.vna files need to comply with the following name convention: XX_YY_ZZ_something.vna where XX, YY, and ZZ are streamwise (x), perpendicular (y), and vertical (z) coordinates in CENTIMETERS, respectively. Anything else added after ZZ_ is ignored by the code (it just copies it for the sake of dataset naming).

Note

This documentation is also as available as style-adapted PDF.

Requirements & Installation

Time requirement: 5-10 min.

Get Python

To get the code running, the following software is needed and their installation instructions are provided below:

  • Python >=3.6

  • NumPy >=1.17.4

  • Openpyxl 3.0.3

  • Pandas >=1.3.5

  • Matplotlib >=3.1.2

Start with downloading and installing the latest version of Anaconda Python. Alternatively, downloading and installing a pure Python interpreter will also work. Detailed information about installing Python is available in the Anaconda Docs and at hydro-informatics.com/python-basics.

To install the NumPy, Openpyxl, Pandas, and Matplotlib libraries after installing Anaconda, open Anaconda Prompt (e.g., click on the Windows icon, tap anaconda prompt, and hit enter``). In Anaconda Prompt, enter the following command sequence to install the libraries in the base environment. The installation may take a while depending on your internet speed.

conda install -c anaconda numpy
conda install -c anaconda openpyxl
conda install -c anaconda numpy
conda install -c conda-forge pandas
conda install -c conda-forge matplotlib

If you are struggling with the dark window and blinking cursor of Anaconda Prompt, worry not. You can also use Anaconda Navigator and install the four libraries (in the above order) in Anaconda Navigator.

Note

Alternatively, create a new conda environment to install the three libraries for this application. However, creating a new environment may eat up a lot of disk space, and installing the Python-omnipresent libraries NumPy, Openpyxl, Pandas, and Maplotlib in the base environment does not hurt.

Download tke-analyst Code

The code can be either started from Terminal (Anaconda Prompt) or within an Integrated Development Environment (IDE). With Anaconda installed, consider using Spyder (Anaconda Navigator > Spyder IDE).

Download tke-calculator.zip and unpack it to the directory where you want to run the code.

Tip

Alternatively to downloading the zip file, you may want to git clone the repository, which enables regular updating of the code (e.g., if there is an update of plot functions available). For using git, make sure that git bash is installed on your computer. Then, open git bash, cd into the directory where you want to download the code and type:

git clone https://github.com/sschwindt/tke-calculator.git

To update any time, cd into the directory where tke-calculator lives and type:

git pull --rebase