2.7.1. Command-line tools for UHDAS data

These tools require the full Python CODAS installation. In all cases, you will need to type the name with --help to get more information about usage.

Some of these are pretty simple, some are more sophisticated. General purpose

figview.py: view a collection of files, eg:

  • figview.py: view all PNG files in all subdirectories

    of current working directory

  • figview.py dirname : view all PNG files in subdirectories of “dirname”

  • figview.py *.png : view all PNG files in the current directory

txyselect.py: select start/end sections for dday,lon,lat eg:

  • txyselect.py nav/dbname.gps

  • This program is used for section selection in quick_web (see below)

  • Guidelines for choosing sections are here


  • convert YYYY/MM/DD hh:mm:ss time to CODAS decimal day (relative to YEARBASE), eg:

    to_day 1970    2015 5 18 8 30 00
    to_day 2015    2015 5 18 8 30 00


  • convert CODAS decimal day (relative to a yearbase) into YYYY/MM/DD hh:mm:ss:

    to_date 2015 137.354 Explore CODAS data

plot_nav.py : plot lon, lat over topography, eg:

  • plot_nav.py nav/aship.gps

quick_mplplots.py: update processing directory with png figures (NOTE: If the processing directory is old, additional information may be necessary.

  • quick_mplplots.py --yearbase YYYY --all

dataviewer.py Use in one of four modes:

  • dataviewer.py : CODAS data viewer

  • dataviewer.py -c : compare two CODAS databases (same cruise)

  • dataviewer.py -e: edit a codas database
    • call from edit directory

    • same as gautoedit.py

  • dataviewer.py -pview singleping data as well
    • call from edit directory

    • assumes processing directory is correctly configured for full Python Processing, including the existence of the raw data and rbin files

plot_reflayer.py: compare phase and amplitude between 2 CODAS datasets Overview of datasets


  • print out some useful information about VmDAS files


  • print out some useful information about a UHDAS dataset UHDAS serial data


  • list recent raw, rbin, gbin files, or lines from raw files


  • plot 1-2 serial feeds (rbin files). If feeds have the same fields, plot the difference. Longitude and latitude diffs are plotted in meters


  • plot rbin positions over topography


  • plot $PASHR heading accuracy from a collection of rbins


  • plot $PASHR heading accuracy from a UHDAS dataset


  • plot all configured heading devices from a UHDAS directory Raw ADCP data


  • plot 4 beams of raw adcp data: (velocity, amplitude or correlation)


  • estimate the transducer angle relative to the bow of the ship from beam-coordinates data (UHDAS *.raw or VmDAS *.ENR) CODAS processing: fixing holes in heading correction


  • run from cal/rotate

  • patch_hcorr.py --help has extensive help

  • summary:
    • read ens_hcorr.asc

    • plot heading correction, stddev, number of pts

    • gives graphical access to filtering options

    • allows manual editing

    • interpolate through holes

    • write new (patched) file and make figures

    • print instructions to use the new file

For more detail about patch_hcorr.py, click here CODAS processing: horizontal GPS and ADCP separation (“dxdy”)

For more detail about ADCP Transducer-GPS offset (maneuvering), click here . CODAS processing: poor PG causes underway bias (“uvship”)

For more detail about this experimental algorpthm to sometimes fix alongtrack biases caused by pervasive bad Percent Good, click here . NOTE that this algorithm requires a stable GPS feed and that the dxdy algorithm (above) already have been applied at the single-ping stage. CODAS processing: make a web site


  • creates web pages like each of these (one for each ADCP)

  • manually select sections: quick_web.py --interactive

  • can also run with automated settings

  • uses txyselect.py for section selection

Guidelines for choosing sections are here CODAS processing setup (advanced)


  • link files from multiple legs (OSX,linux)


  • remake rbins (gets most of them; do the rest manually with asc2bin.py or serasc2bin.py. (more information about rbin messages is here