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:
- Python 2.4 or Python 2.5 (see free software link, below)
- Matlab R13 or newer, from
The MATHWORKS
- You might also want m_map,
a matlab package used in graphical editing and other vector-plot applications.
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
- 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.
- Zip archive of executables, specific to your operating system:
- binwin32.zip: binaries for Win95/NT/XP (command line)
- binlnx.zip: binaries for linux for Intel processor
- binlnx64.zip: binaries for linux for Intel 64-bit processor
- binosxppc.zip: binaries for MAC PowerPC processor
- binosxintel.zip: binaries for MAC intel processor
- Sun OS, Solaris, Silicon Graphics: out of date. Try downloading scons and compiling from source.
- pycurrents.zip: Python code for
for setting up the processing tree and running the processing.
- adcp_doc.zip: documentation,
including CODAS, ADCP processing, reading LTA or single-ping data with
matlab, downloads and setup...
- 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.
- 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:
- qdemo_vmdas.zip: RDI's VmDAS averaged (LTA) and single-ping (ENX) data
- qdemo_uhdas.zip: Univ Hawaii acquisition and processing
- qdemo_hdss.zip: Revelle's HDSS sonar
-
Optional but recommended:
-
codas3.zip for CODAS source code; even if you don't want to modify
anything, this can be useful for finding out what the programs really do. It
is not required, however, unless you need to recompile for your
particular system. This is advisable if you use anything other
than Windows, OSX (ppc or intel) or a recent Linux distribution. Compilation should
work for any reasonably Unix-like system, but require some configuration changes.
A new build system has been implemented and replaces the original
source directory.
- 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:
- /home/noio/programs/codas3/bin/lnx (for 32-bit linux)
- /home/noio/programs/codas3/bin/lnx64 (for 64-bit linux)
- /home/noio/programs/codas3/bin/osxppc (for OSX (ppc))
- /home/noio/programs/codas3/bin/osxintel (for OSX (intel))
- /home/noio/programs/codas3/bin/win32 (for Windows)
python programs:
- /home/noio/programs/py_currents/adcp (for quick_adcp.py)
- /home/noio/programs/py_currents/data/nmea (for parsing NMEA data)
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.:
-
add /home/noio/programs/matlab to the MATLABPATH environment variable
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:
- PATH (modify) allows the command line to find the program without the
full path). This will include executables and the python program
itself
- PYTHONPATH (new variable) allows python to find the modules it
needs to load
To change these using Windows tools, as administrator, go to
Settings: Control Panel: System: Advanced : Environment Variables
and
- add these to PATH (a semicolon-delimited list):
- c:\w\programs\codas3\bin\win32 (for executables)
- c:\w\programs\pycurrents\adcp (for .py scripts)
- c:\w\programs\pycurrents\data\nmea (NMEA parsing programs)
- 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:
-
DO NOT add c:\q\programs\matlab and all its subdirectories to your matlab
path. You would be adding things that will conflict with what you
are used to using.
-
The path to your PROGRAMS directory may be quite long. You can
create a network share of the folder containing
PROGRAMS (recommend "read only", and then "map network drive")
and assign the folder a drive letter (such as "N"). Then the above
description would use "n:\programs" instead of "c:\programs".
-
Make sure the "properties" of a python files (*.py) are associated with
c:\python25\python.exe (whatever your python
executable is). ActiveState Python sets this up automatically. I have
not tested python.org. This file association is set in the Control
Panel, under System.
Documentation for processing data using CODAS software starts here.