Python Packages for Editing, Plotting

Note

If you are planning to try and process with Matlab only, you can skip this section.

If you want to process with Python, go to the new documentation for better instructions and consistent examples.


THIS SECTION MAINTAINED FOR HISTORICAL REASONS

Numpy

NumPy is the core numerical array extension for Python, and it is central to our shift from Matlab to Python. Download and install the current version. Versions available from linux distributions can be quite old. Version 1.5.x is adequate, but 1.6.x or higher is preferred. Binary versions are available for OSX and Windows; use them rather than trying to compile from source, but pay close attention to the instructions regarding Python versions.

Note

If you are installing from source, you must install Numpy before installing Matplotlib

CODAS Python extension code

At this stage, you can compile the CODAS Python extension code, which includes the Python CODAS reader and various tools we use for Python-bsed CODAS processing.

Note

You must compile the codas3 library and binaries before trying to compile the CODAS extension code.

Directions:

In a shell prompt in the “adcp_programs/pycurrents” directory, type:

python runsetup.py

Matplotlib

Matplotlib is a plotting library. Installation from source is easy on linux but can be tricky on OSX and is for experts only on Windows. So, on Windows use a binary installer; on OSX you are also probably better off using a binary installer, but if you are accustomed to building software you may be able to compile from source; and on linux you probably should build from source, since packaged versions of matplotlib often are badly out of date, and matplotlib has been undergoing major improvements.

At present, CODAS Python processing requires version 1.0.1 or higher.

Download and install the latest matplotlib and its mapping toolbox, basemap The download link in the basemap installation instructions may be incorrect; try this instead. As with numpy, if you are using a binary installer, make sure it matches your OS, python, and numpy version.

Topography

A full Python CODAS installation requires topography that our python programs can read. You can use ETOPO or Smith-Sandwell topography this purpose, but you must follow instructions on the next page for download and installation (or UH Python code will not be able to read it).

GUI Toolkit: WxPython

We have chosen to use WxPython as our GUI toolkit for the Python version of our interactive editing tool, “Gautoedit” (pronounced Gee! Autoedit!). If you have WxPython, you can also use our CODAS data viewer to look at a CODAS database or compare two instruments from the same cruise. Make sure you get the version to match your Python version.