Software Exchange Thread
I spend quite a bit of time using Matlab, usually writing scripts someone else has already done. To prevent further re-invention of the wheel, I thought it might be usefull to have a place to exchange matlab scripts/functions/etc. for working with Nortek data.
To start things off, I'm attaching a script for converting Aquadopp Profiler ASCII data to matlab .mat files. The raw .prf file must first be converted using Nortek's AquaPro into ASCII format. Do not check "include wave burst time" during AquaPro conversion.
Although bin2mat already provides a similar function, I wanted access to the raw data, and all of it. The output is: **~Profile.mat : contains all the general information plus profiles
**_####.mat: each individual waveburst
Unfortunately I cannot offer tech support, but I will continue to post updated versions.
The program can be downloaded here
Here's another fun one. Our Aquadopp Profilers are in extremely shallow water (~1.5m), and thus go dry during low tide. This script shows why it is important to remove cells above water level, as the velocity data is random and meaningless.
Software can be downloaded here
Here is a simple one for calculating the position of the profiler's measurement cells. Distances are in along-beam direction, so multiply by cos(beam_angle) to get vertical depth.
We deploy in shallow water, where cells are sometimes out of the water. Comparing this distance to the pressure reading allows me to discard cells above the water surface.
Software can be downloaded here
(Posted by NickMortimer Dec. 05 2007)
Hi All,
I've been getting into writing MEX files for matlab. Here is a mex file for converting *.vec files to matlab structures.
Please note that it is only compiled for windows. But could compile for Linux at a later date.
Note there seems to be a reduction of about 70% in file size.
I have tried to keep the original types where possible.
Just unzip to a directory on the path and type nortek_vconvert
It takes about 30 - 50 seconds on my old machine ![]()
It saves the .mat file in the same dir as the original file.
Have fun
I'd be interested to hear from you
Nick
I appreciate the the bin2mat software has been made available for Windows platforms; unfortunately, our data processing infrastructure is on Linux.
Can a Linux port or the source code be made available?
Hello Mike,
The source code was posted in another thread titled "Nortek to Matlab". If the following link works you will find it towards the bottom of the discussion.
You will also note that there a user, Nick Mortimer, has done is own MatLab tools for converting to MatLab format. It is better in the sense that it works ,-) I encourage you to try this or get in contact with him if you are looking to further develop this.
kind regards,
Torstein
Hi,
I've written several Perl scripts that help post-process Aquadopp data.
The scripts (1) search for bad data, (2) print every n-th line (useful for subsampling long high temporal resolution deployments), (3) calculate vector magnitude and angle, and (4) denote flows coming from user-defined hemispheres to be positive or negative.
I've also included compiled .exe's of the scripts for those on windows who don't have Perl (I renamed them .xex to ease file transfers).
There's one general readme for all the scripts, and detailed readme's within each directory.
I've posted them here:
https://qshare.queensu.ca/Users01/lewist/public/nortek/
Apologies if they're poorly written, this was my first experience with Perl. There could still be errors as well 
Ted
Here is a Matlab-function to calculate direction from East and North coordinates given in vectors. Simple but not completely trivial (unless you compare to the Excel spread sheet in another thread
)
Speed is trivial though: speed = sqrt(E.^2+N.^2);
Sven
Hi Torstein,
I am in need of a way to convert Vector binaries into a format that Octave (or Matlab) can read. I am working in Linux, and the code provided by Nick Mortimer was written for Windows. Can you please provide me with some way to get the source code or get into contact with him for this purpose?
Thank you,
Andrew
Previously Torstein Pedersen wrote:
Hello Mike,
The source code was posted in another thread titled "Nortek to Matlab". If the following link works you will find it towards the bottom of the discussion.
You will also note that there a user, Nick Mortimer, has done is own MatLab tools for converting to MatLab format. It is better in the sense that it works ,-) I encourage you to try this or get in contact with him if you are looking to further develop this.
kind regards,
Torstein

