• Pronounced “Gee! Autoedit!”
  • a Matlab tool for editing CODAS ADCP data

Gautoedit Documentation


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.


The original “Gautoedit” was written in Matlab. The new version is written in Python. It’s “feel” is slightly different, because the underlying graphical libraries are different, but the functionality is the same. The Python version has not yet been thoroughly documented, but this guide should serve as a good introduction to the concepts in each. Some notes about gautoedit.py are here.

The rest of this section refers specifically to the Matlab version of “gautoedit”. The lessons and approach are the same as the Python version, but the look is slightly different. At some point, there will be a Python Gautoedit section. For now, there is the link (above) and the following section.


The “gautoedit” package is a collection of programs for extracting and displaying velocity and other ancillary data from a codas database in panel plots, and creating ascii files of flags for bad data. As with the original “waterfall” editing, the ascii files containing information about bad data are then applied to the database so that further data extraction will not include those flagged values.

This html documentation is meant to give you an introduction to the autoedit package and provide some guidance as to its use. It is not a comprehensive editing tutorial, so some detail is lacking. Data come from two sources:

  1. the same pingfiles that were used in the original “demo”
  2. a much newer dataset that contains Ashtech headings in the user buffer and some good illustrative editing examples.

Setting up gautoedit

Gautoedit is set up during standard CODAS processing of an ADCP dataset using quick_adcp.py. After getting the data into the CODAS database, go to the ‘edit’ subdirectory and (in Matlab) type


Gautoedit has evolved somewhat since this tutorial was written, but the fundamental ideas are the same.

If neccessary you can modify setup parameters to some extent by editing the following

  • asetup.m
  • aflagit.m
  • command line (you can control the size of the gui window: type “help gautoedit”


  • Matlab can only run one “gautoedit” session at a time
  • You can access the command line and do other matlab things while running gautoedit, but you must be in the initial directory (edit/) when you hit buttons on the gui tool or it will complain
  • You can’t see the effect of your editing until you’ve finished and applied all the ascii files to the database and rerun the navigation steps. Seeing the results immediately is on the list of “things to do”.
  • You should AVOID resizing the figure windows while they are drawing: matlab will sometimes draw the upcoming figure in whatever window you’re fiddling with, and you can end up with a plot inside your gui tool. Don’t worry - just kill that figure and start gautoedit again.
  • This link describes some Windows weirdness to be aware of...

Gui panel layout

The gui panel has four sections (click to see screenshot)

Gautoedit always plots a panel figure with ocean velocities (rendered absolute via navigation steps). By default it will also plot a vector plot of upper ocean velocities overlaid on topography. This can be turned off. You can choose to plot amplitude and velocity in the forward direction. You can also choose to plot error velocity and an experimental parameter called “bias parameter” (undocumented: indicator for underway bias in the presence of strong scattering layers).

Editing ADCP data

starting out

  • Run gautoedit from the edit/ subdirectory of your adcp processing tree
  • Choose the number of days to display (based on your screen resolution), make sure you can see individual profiles. The amount of data (number of days) to display will depend
  • Choose your actual starting date so you don’t have a big blank spot at the beginning of the cruise
  • Look at the jitter cutoff: it should be just low enough to cut off the tops of outliers but not catch every little bump
  • Press “show now” to load the data and get started
  • Examples from two databases are here (1) (2)

a typical sequence of steps

  • You might want to adjust the jitter cutoff to see whether the places with the highest jitter actually show up in the velocity as anomalous profiles. If you can’t see a difference in character between the profile with the jitter spike and its neighbors, chances are there is no reason to flag it
  • You might have data with bottom tracking OFF but with the bottom within the instrument’s range. Try adjusting the three bottom-detection parameters. The “show amp and forward” button brings up a panel with amplitude the next time you hit “show now”, providing a useful context for determining whether you’re looking at the bottom or fish.
  • You might have data with alot of bad “tails” (bias near the bottoms of profiles). These are probably best removed with “rzap” (rectangular selection) or “pzap” (polygon selection; a slow doubleclick will terminate). The two tools are different, and you may prefer one to the other for this purpose.
  • You might need to flag a whole time range as bad. If so, click on “del time range” and select the start and end of the bad time range. The profiles in that range will automatically be listed to “abadprf.asc”
  • You might want to see what the data look like without the autoedit parameters applied: if so, try turning on both “plot in new” and “do not show (autoedit) editing”, and then hit “show now”. You will get a new figure with the absolute velocity as it comes from the database, (as well as any other figures you have turned on) with no autoediting applied. This can be useful in determining howo to change parameter values or what approach to take in editing the data.
  • Make sure you do any deletion of time ranges or bad bins before you move on, or you’ll forget to come back to it.
  • When you are satisfied with your editing parameters, hit “list to disk” and the flags will be listed to ascii files a*.asc. Hit “show next” and move on to the next panel.

Other things to edit

Interpretation: things to keep in mind

finishing up

When you have gone through the whole dataset, you have a collection of ascii files. You need to update the following before you attempt to make any plots or assess whethere anything more needs to be done.

Applying the flags to the database using quick_adcp.py:

(your yearbase may be different)

Run this from the processing directory: it should all be on one line, though the display on this page may split the text)

quick_adcp.py –use-refsm –yearbase 1993 –setps2rerun –apply_edit:navsteps:calib –auto

Changing editing that has already been flagged or applied to the database

Editing is really a one-way street: “flag more”. If you want to step back and undo a step it is possible, but it can be complicated. This page discusses the setup and various scenarios.