Setting up CODAS3 shipboard ADCP data processing software



Installing CODAS processing software

Please let us know if you are downloading zip files and want to be informed if there are updates or bug fixes.

What you need from other sources:

Follow this link to free software from other locations. Please read the notes before deciding which Python to download. There are also links to other generally useful software, and some comments about their use.

UPGRADE : There really isn't such a thing as an upgrade, only a re-installation. Move your present "programs" directory to another name for safekeeping, then follow the instructions below for a new installation.

Pay attention to the section about paths (matlab path, python path, path to executables) below: you will have to alter your present configuration to find files in new locations, as the code has been reorganized since the last release.

NEW INSTALLATION: Follow the instructions below for obtaining zip archives and installing them. NOTE: When you install our matlab code, there will be no "m_map" included. If you wish to use "m_map", you should either copy the version you were using before (from your renamed directory) or download a new version, if appropriate. See the "matlab" portion of the discussion about paths, below.

To set up for any CODAS ADCP processing, you need all of the following zip archives from us (link to all zip files is here). Save these zip files to disk before unzipping them. See below for specific instructions.

What to download

  1. matlab.zip: Matlab files Some are of very general usefulness (see matlab/misc/read_asc.m, for example), some are specific to our shipboard ADCP data processing system.

  2. Zip archive of executables, specific to your operating system:

  3. pycurrents.zip: Python code for for setting up the processing tree and running the processing.

  4. adcp_doc.zip: documentation, including CODAS, ADCP processing, reading LTA or single-ping data with matlab, downloads and setup...

  5. adcp_templates.zip required for any processing of ADCP data This contains the directory tree of a completely processed dataset ("demo"). The original pindata demo is the dataset used in an extensively documented tutorial. If you want to see what the final directory tree looks like after processing manually, download this zip file. This directory also contains necessary template material for setting up a new processing tree.

  6. qdemo_pingdata.zip: No matter what, you should get the original demo, run using quick_adcp.py. This is the best-documented processing example, and (though old) contains the fundamentals of CODAS processing.

    You should also get examples of what the processing looks like for your particular kind of data. Examples of CODAS processing are available for other sonar and acquisition combinations:

  7. Optional but recommended:
  8. Old examples or demos: (no longer supported, might work...)
Zip archives are located here .




How to install:



Everything is archived using the "zip" utility from InfoZip, and should be installed using "unzip" or a Windows equivalent. You almost certainly already have one of these, or, if using Linux, can add it from your distribution. If you don't, see the Info-ZIP website for current downloads. If you have access to ftp only, then go to ftp.uu.net/pub/archiving/zip and find the subdirectory for your particular system.

All zip files are intended to be unzipped in the SAME DIRECTORY (denoted PROGRAMS in various documentation). You must preserve the path (folder) information; do not unzip as a collection of files without retaining the directory structure.

Your "programs" directory should look something like this when you're done:

programs/adcp_doc
programs/adcp_templates
programs/codas3
programs/matlab
programs/pycurrents
programs/q_demos
programs/uhdas

HINT: Try unzipping one archive first to make sure it does what you expect. Adjust accordingly. For example, in Windows "extract all", specify the path to "programs" and the files should be extracted in the right place -- no need to specify subdirectories.

NOTE: These subdirectory trees and the files they contain should not be changed by users. For example, don't run the tutorial where it lands when you unzip it. Make your own processing directories for testing.

FOR UNIX:
In your .cshrc (or .bashrc, or wherever you keep your shell setup instructions) add to your path the location of the executables for your machine: this includes the binary executables, and the locations of executable and python scripts. We install everything under /home/noio/programs, so we add the following to our path (path to binaries first, then add path to python code):

CODAS binaries:

python programs:



PYTHONPATH:
To use quick_adcp.py, you will need to add three locations to your  PYTHONPATH environment variable:


MATLABPATH:
You should also add the location of the matlab directory which was extracted from matlab.zip to your MATLABPATH. Any time you run matlab programs you should type "adcppath; radcppath; mexpath" to add the appropriate programs to your path. Alternatively, you can put these commands in your ~/matlab/startup.m file.:

DO NOT add PROGRAMS/matlab and all its subdirectories to your matlab path. You will add things that will conflict with what you are used to using.

To run a Python script, type :
  python program.py  

Or, if it is on your path, you can simply type its name to execute it.
   program.py  

The permission should already be set to executable. The top line is "#!/usr/bin/python", which is correct for many Linux systems. If you are on another Unix-like system, you might need to change this top line to give the correct path to your python executable. We are trying to replace the top line with a more general statement, "#!/usr/bin/env python" but may have missed some...

FOR WINDOWS

Suppose (for example) everything was extracted into c:\w\programs.
There are various ways to set this up, but these instructions should work. You need to change three environment variables and set up your matlab path . These instructions use the Control Panel to set these variables. On a recent Windows XP installation no reboot was necessary after making the changes, but rebooting (or at least calling up a new C-prompt window) may be required.

ENVIRONMENT VARIABLES

The environment variables to alter are:
To change these using Windows tools, as administrator, go to
Settings: Control Panel: System: Advanced : Environment Variables
and
  1. add these to PATH (a semicolon-delimited list):

  2. create a new variable called PYTHONPATH

MATLAB PATH

You should also go into your matlab path editor and add c:\w\programs\matlab (the path to the UH programs directory) to the path, and save it. Any time you run matlab programs you should type "adcppath; radcppath; mexpath" to add the appropriate programs to your path. Alternatively, run the commands once, then go to "Set Path" and "Save".

NOTES AND HINTS:

Documentation for processing data using CODAS software starts here.