2.6. Dataviewer: view, edit, compare

Python3 dataviewer.py is a program for displaying velocity and other ancillary data from a codas database in panel plots, and velocities over topography. It uses Qt libraries for window management Matplotlib for figures, and Basemap for projections.

This tool was designed to let the user visualize shipboard ADCP data, presenting:

  • a variety of matrix data in color panels (eg. ocean u, ocean v, precent good, backscatter)

  • some time-series variables with the same time axis as the panels (eg. ship speed, ship direction)

  • vectors of ocean velocity over topography, colored with the transducer temperature

It has four modes, view, edit (which is still available under its old name gautoedit.py), compare and ping.

All dataviewer.py modes are designed to let you view ADCP variables from the CODAS database, extracted by time. All start with three main panels:

  • Control Window (to extract data)

  • Panel plots (view data as time series in panels)

  • Topography (view velocity as vectors)

# program to run                    # what it does
dataviewer.py                       view only
dataviewer.py -e                    "gautoedit.py"; edit a CODAS dataset
                                        - manual editing
                                        - threshold editing
                                        - bottom editing
dataviewer.py -c                    compare two CODAS datasets
                                        - manual editing
dataviewer.py -p                    view CODAS variables and single-ping
                                    (only works with freshly-processed data)


NEW: Dataviewer allows you to save your settings or your progress.

  • Settings: general settings for using dataviewer in the active mode

  • Progress: suitable for the particular cruise you are working on, (eg. thresholds, number of panels, where you were in the dataset when you stopped.

Work Flow

  1. Make your Project Directory (as in the Demos) to hold

  2. For each sonar:

    1. Create the text file for your sonar (to keep notes), eg km1001c_os38nb.txt

    2. Follow the demos to create the processing directory. You are creating or copying a directory with Preliminary Processing:

    3. Do the first steps in post-processing, i.e. get the calibrations close

      • look for (and patch using patch_hcorr.py) any holes in the heading correction (if there is one)

      • assess the phase and amplitude (scale factor) calibrations; apply them

      • assess the transducer-GPS offset; apply as directed

    4. Use dataviewer.py -e to edit the data.

      • remove only obviously bad data

    5. Assess the calibrations again; apply correction if needed.


It is a good idea to copy a processing directory to another name before making a change:

  • if you make a mistake you don’t have to start over

  • you can compare the directories to see the effect of the change

Now you have multiple processing directories with data that are almost as good as possible.

  1. Use dataviewer compare mode to compare them and edit out more if needed.

  2. When finished

The next pages are about each dataviewer.py mode in order, as well as a few nuggets: