Gautoedit (like the original “waterfall plots”) has two kinds of editing: thresholds, and manual. Both append data to ascii files. These files contain the timestamp of the bad profile and information about the flagging.
Gautoedit output
file | file contains ... |
---|---|
abadbin.asc | timestamp and list bins to flag |
abadprof.asc | timestamp of whole profile to flag |
abottom.asc | bin identified as ‘bottom’ |
Gautoedit appends flag information to these files. But the information is not transferred to the database until you run
quick_adcp.py --steps2rerun apply_edit ...
There are two types of editing available:
“Threshold editing” refers the adjustment and application of values in the colored boxes along the left side of the gautoedit window. To see how this works, try adjusting “jitter”:
Any of the colored values on the left can be adjusted and when you clock “show now” it will show you the effect of those thresholds, i.e. what you see (from the gautoedit editing) is what you will get (in the database) if those thresholds are applied.
You MUST click “list to disk” or the flags will not be appended to the ascii files.
Click thumbnail for a larger picture
There are basically 4 manual editing buttons:
In all cases, when the tool is finished and the window exits, the flag information is written ascii file.
Click thumbnail for a larger picture
data=agetmat('a_');
Remember gautoedit only appends to ascii files; it does not put flags in the database.
The quick_adcp.py step called “–steps2rerun apply_edit” performs several steps. These are performed in the edit/ subdirectory:
dbupdate ../adcpdb/dbname abottom.asc
This step takes any bins identified as the bottom (stored in “abottom.asc”) and identifies them in the database
dbupdate ../adcpdb/dbname abadprf.asc
This step identifies bad profiles in the database by setting the “last good bin” value to -1.
badbin ../adcpdb/dbname abadbin.asc
This step identifies bad bins in the database. A decimal value of 1 is put into “profile_flags” at this stage.
set_lgb ../adcpdb/dbname 20
This step takes the bottom (from #1) and makes flags (decimal flag value of 4) below the bottom. It also masks data close to the bottom if the data are subject to side-lobe contamination (depends on beam angle). The default beam angle is 30 degres. If another number is specified, that is used (eg. “20” in this example)
setflags setflags.tmp
This does two things:
Try using “showdb” to look at a database. The variable “profile_flags” shows the editing status of a given bin or profile. Bins are flagged in the database with a binary bit, depending on why they were flagged. This is a useful way to see whether data have been flagged or not.
binary | decimal | below bottom | percent good | bad bin |
---|---|---|---|---|
000 | 0 | |||
001 | 1 | bad | ||
010 | 2 | bad | ||
011 | 3 | bad | bad | |
100 | 4 | bad | ||
101 | 5 | bad | bad | |
110 | 6 | bad | bad | |
111 | 7 | bad | bad | bad |
Example: You have a UHDAS dataset in which too much data were edited out
If you need to start over, you will have to clear all profile flags, remove ascii files associated with editing, and do the editing from scratch. If all you need to do is add flags, just run gautoedit and remove the offending data (i.e. add flags to the existing ones). Here are three examples when you might need to return the flags to zero and start over
- At-sea WH300 data were collected at 2-minute averages, but the default jitter threshold is for smoother data than that. The data in gautoedit will show lots of little white stripes where profiles were thrown out by the jitter criterion that was too low for this dataset
- The gyro was replaced without any change in calibration and the headings are off by several degrees, so profiles at acceleration points (stop/start or turn) are flagged as bad because of the jitter criterion.
- You are training someone else to process ADCP data and they flagged way too many things as bad. You do not need to redo all their processing, just the editing
To start over with editing:
original (setflags.tmp) new (clearflags.tmp)
--------------------------- ---------------------------
dbname: ../adcpdb/a_demo dbname: ../adcpdb/a_demo
pg_min: 50 pg_min: 50
set_range_bit clear_all_bits
time_ranges: clear_range
all time_ranges:
all
You can change the percent good used by quick_adcp.py (eg. change to 30 instead of 50) by specifying –pgmin 30 but you must do it every time you call quick_adcp.py. Otherwise it will revert to the default.
To change percent good once,
original (setflags.tmp) new (setflags30.tmp)
--------------------------- ---------------------------
dbname: ../adcpdb/a_demo dbname: ../adcpdb/a_demo
pg_min: 50 pg_min: 30
time_ranges: time_ranges:
all all
Then run
quick_adcp.py --yearbase YYYY --steps2rerun apply_edit --pgmin 30 --auto
“We” (a vigilant user) discovered that bottom blanking was hardwired for 30deg, which is not correct for most Workhorse instruments. This bug only affects data collected when the bottom was in range. Data processed with code prior to May 1, 2009 will have had 15% of the range flagged near the bottom (cos(30deg)), but if the instrument has 20deg beams, the flagging should have been more like 5% (cos(20deg)).
To recover the range 85%-95% of the water column depth from such a dataset
original (setflags.tmp) new (clearflags.tmp)
--------------------------- ---------------------------
dbname: ../adcpdb/a_demo dbname: ../adcpdb/a_demo
pg_min: 50 pg_min: 50
set_range_bit clear_all_bits
time_ranges: clear_range
all time_ranges:
all
Now you have a dataset with PG<50 flagged as bad.
edit astup.m and add the following line to the bottom
config.beamangle = 20;
Then run
quick_adcp.py --yearbase YYYY --steps2rerun apply_edit --auto
Example
In this case the flag information has been appended to the ascii files but they have not been put into the database.
Recommended procedure:
quick_adcp.py --yearbase YYYY --steps2rerun apply_edit --auto
Now gautoedit is consistent with the database.