Quick_adcp.py: OverviewΒΆ


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.

Quick_adcp.py is a Python script that runs the usual CODAS processing steps in a predictable and configurable manner. For a clean dataset, it provides a relatively quick and painless way of looking at the data, addressing configuration issues, and editing. If your dataset has problems, you can always run the appropriate steps manually.

Setup of a processing directory should use adcptree.py. Quick_adcp.py can deal with many combinations of data acquisition, averaging (or not) and instrument, as long as the processing directory was set up with adcptree.py. See this table for information about which kind of processing can be done with which engine (Matlab or Python)

At its operational level, CODAS processing consists of a series of C programs or matlab programs that interact with the CODAS database or with files on the disk. C programs usually deal with the database directly, by loading data (eg. ldcodas), extracting data (eg. adcpsect) or by manipulating the databaes (eg. rotate, putnav, dbupdate). Python or Matlab programs are used to maniplate files on the disk so C programs can use them.

Quick_adcp.py is designed to work through the standard processing steps with a standard protocol. For each processing step,

  1. Change directories to the appropriate subdirectory (for that task)
  2. Write a file with information for the program that is about to run
  3. Run a program that reads the file, and performs the processing task.

Three kinds of programs might run for processing. Their files are:

  • for C programs (executables), a control file ending in .tmp
  • for Matlab, a file ending in _tmp.m
  • for Python, a file ending in _script.py

In order to process data, a set of supporting programs must be installed. This includes Python, various supporting packages, and the actual C, Python, and Matlab programs that make up the CODAS suite. The shell (eg. bash, or Command Prompt) must know how to find the appropriate programs, requiring various environment variables to be set. Once the computer is set up, the general procedure is:

  1. pick a working area for your processing (not in the CODAS installation directory–that is reserved for UH code)
  2. run adcptree.py with the appropriate options
  3. locate your data files, determine the appropriate switches for quick_adcp.py.
  4. write a control file for quick_adcp.py with the information to process yoru dataset. (eg. control file is q_py.cnt)
  5. run quick_adcp.pyd:. Arguments can be typed on the command line or stored in a control file (accessed with --cntfile q_py.cnt). Commandline options override control file options.
  1. more steps follow to complete the processing

The purpose of quick_adcp.py is to provide a mechanism to run all the individual steps in a predictable and automatable way. If a dataset requires special attention, any of the steps can be run manually with different settings from the defaults. Identify the step that must be run manually, determine the “tmp” file to edit, change the settings, and run the (shell, python, matlab) command manually.


Always run quick_adcp.py from the root processing directory