As of April 2013, this version of the documentation is no longer maintained; however, it is consistent with the last (now retired) version of CODAS processing that used Matlab. We no longer update or fix the Matlab processing code, but we will maintain the Matlab code that reads CODAS Matlab output. Although the notes refer to both Python and Matlab processing, none of the code here will be maintained. This (now retired) documentation and code will remain available for awhile longer.
Python processing code is actively maintained and developed, and CODAS Python processing is documented here.
Suppose (for example) all the CODAS programs were extracted into c:\w\adcp_programs. You need to
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 you will need to start a new command-prompt for the changes to take effect.
To change these using Windows tools, as administrator, go to Settings : Control Panel : System : Advanced : Environment Variables and edit the following two entries.
These paths are delimited by semicolons.
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
add these to PATH:
- C:\w\adcp_programs\codas3\bin\win32 (for executables)
- C:\w\adcp_programs\pycurrents\adcp (for .py scripts)
- C:\w\adcp_programs\pycurrents\data\nmea (NMEA parsing programs)
- C:\w\adcp_programs\pycurrents\adcpgui (for python gautoedit)
- C:\w\adcp_programs\pycurrents\plot (for python navigation plots)
PYTHONPATH (new variable) allows python to find the modules it needs to load
create a new variable called PYTHONPATH with this entry:
You should also go into your matlab path editor and addC:\w\adcp_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” to add the appropriate programs to your path. Alternatively, run the commands once, then go to “Set Path” and “Save”.
IMPORTANT: See the section about mex files for more information about the “table1” we use for linear interpolation. This is important to get right and becomes more difficult with each new matlab release.
Any time you are going to run CODAS matlab code, type the following first to add the specific paths that are used.adcppath; radcppath; mexpath
Make sure the “properties” of a python files (*.py) are associated with c:\python26\python.exe (whatever your python executable is). Modern python installations seem to do this automatically.
Open the folder C:\w\adcp_programs\pycurrents\adcp in Windows Explorer
Right-click “quick_adcp.py” and verify that the default item in “Open With” is Python.
If it is not, click “Open With” to choose the program that you want.
Click “Choose Program...” to choose the program you want.
Browse to your Python installation (eg. C:\Python26) and click on Python.exe
Select the “Always use the selected program” to open this kind of file check box if it is not selected. Click OK.
Note From now on, Windows will open all files that have this file name extension in the program that you selected. To change this, you must follow these steps again and associate a different program with this file name extension.