RADEDIT

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
BUGS
SEE ALSO

NAME

radedit −− editor for correcting unfolding errors in radar ray data

SYNOPSIS

radedit [-r|x firstray] scanfld time nyquistvel refl rvel reflthresh in out

DESCRIPTION

Radedit edits Doppler radar ray data in Candis format for badly unfolded rays. The input file is assumed to have been produced by raduf(1), hrdrad(1), or some similar program that allocates one variable slice per ray. It is assumed that automated unfolding has succeeded in getting most of the unfolding done correctly, but that a small fraction of the rays need to be manually examined. Radar data are displayed on a color X11 display. Doppler velocity is encoded by color and plotted as a function of range gate and ray count. Badly unfolded rays show up as vertical stripes of color that stand out boldly from their background. Clicking the mouse on such stripes forces a comparison of the Doppler velocity in that ray with its immediate neighbors. If the difference between the neighbor-average and the ray velocity exceeds the Nyquist velocity, twice the Nyquist velocity is added or subtracted to the subject ray until this difference is less than the Nyquist velocity. This correction is done on a gate-by-gate basis for the entire ray. Approximately 200 rays are examined at a time. When corrections are complete, the first 150 rays are written to output, and the next 150 are read in. The balance of the first set of rays are kept for continuity.

The radar reflectivity may also be displayed. This appears in the form of a gray scale plus color plot. No editing may be done on the reflectivity.

Segments of a file can be edited. The balance of the input file can either be passed to the output or deleted. This means that one need not edit an entire file in a single pass. However, it is important to note the current ray count when stopping in the middle. This way the editing can be picked up at the proper place in the next editing session.

The editor has two modes, a command line mode in which the reflectivity may be shown and the session may be terminated, and an editing mode in which unfolding corrections may be made and the editing frame advanced.

The command line arguments are as follows:

-r|x firstray

This optional argument starts the editing at the ray just after ‘‘firstray’’. If the option ‘‘-r’’ is used, the preceding rays are written to the output. If ‘‘-x’’ is used, they are discarded.

scan

This is the name of a variable in the input file (typically the radar azimuth) that is plotted, so one can keep track of where the radar is pointed during the editing process.

time

This is the name of a variable in the input file that gives the time value of each ray. The units are assumed to be kiloseconds.

nyq

This is the name of a variable, assumed to be in the static slice, that gives the Nyquist velocity of the radar.

refl

This is the name of the radar reflectivity, assumed to be a function of the range, and to have the units of dBZ.

rvel

This is the name of the radial velocity variable, assumed to be a function of the range, and to have the units of meters per second.

reflthresh

This represents a thresholding value for reflectivity. If it is less than -100 dBZ, no thresholding is done. If it is greater, then 1) regions with missing reflectivity or reflectivity less than reflthresh have the radial velocity and reflectivity set to the bad data value, and 2) single gates surrounded in range by bad radial velocity data have the reflectivity and velocity set to the bad data value. These changes are made on input and transmitted to the output file.

in

This is the name of the input file.

out

This is the name of the output file. The program will not let this be the same as the name of the input file.

Upon startup the user will be presented with the initial X11 display of the Doppler velocity and a command line prompt. The display will show either the first data in the input file, or the data immediately after the ray specified with the optional starting ray specified by ‘‘-r’’ or ‘‘-x’’ on the command line. Typing ‘‘help’’ will get a brief summary of the available commands. Typing ‘‘refl’’ will show the corresponding reflectivity data. Typing ‘‘vel’’ will bring back the velocity display. If the display gets trashed (say, by being covered by another window), typing ‘‘refresh’’ will restore it. Typing ‘‘get’’ will advance the editing frame. Typing ‘‘edit’’ will put the program into a mouse-controlled editing mode. Typing ‘‘bye’’ will write the current buffer to the output file and copy the rest of the input to the output before quitting. Typing ‘‘kill’’ will write the current buffer to the output file and quit. The rest of the input file will not be copied.

In editing mode, clicking the left mouse button when the cursor is over a ray will try to fix the unfolding in that ray. Clicking the middle mouse button while in the display window will advance the editing frame just as the ‘‘get’’ command does in command line mode. Clicking the right mouse button in the window will return the editor to command line mode.

EXAMPLE

To edit a file named ‘‘infile’’ and write the results to ‘‘outfile’’, type

kestrel% radedit az time nyvel dz vr infile outfile

The radar azimuth angle is named ‘‘az’’, the time is named ‘‘time’’, the reflectivity is named ‘‘dz’’, and the radial velocity is named ‘‘vr’’ in the variable slices of the input file. The Nyquist velocity is named ‘‘nyvel’’ in the static slice. When the prompt appears in the command line window, type ‘‘edit’’ and move the mouse cursor into the display window. Fix badly unfolded rays by clicking on them with the left mouse button. Advance the frame with the middle mouse button. When at the end of the file, click the right mouse button and type ‘‘bye’’ in the command line window.

To edit just a segment of this file, say from ray 12.074 to ray 14.050, type

kestrel% radedit -r 12.074 az time nyvel dz vr infile outfile

This will transfer all the data before this ray from the input to the output file before editing commences. If you don’t wish these data to be transferred, use ‘‘-x’’ instead. When you have reached ray 14.050 in the editing process, exit from edit mode by clicking the right mouse button and type ‘‘bye’’ or ‘‘kill’’ in the command line window, depending on whether you want the rest of the data transferred or not.

BUGS

The display window doesn’t refresh automatically when it gets trashed. This is because the program is normally waiting for command line or mouse input, and doesn’t check for events. I am too lazy to fix this problem. It could be done eliminating the command line interface and running the program via buttons in the display window. Any volunteers?

A color X11 display is required -- monochrome won’t work, and there is an outside chance that some color displays won’t work because they don’t have all of the required colors in the standard color map.

Other editing features such as zapping regions, etc., would be useful.

Because of the A-scan format of the display, one can’t easily visualize the geometry of displayed features in real space.

For a correction to be made on a range gate of a particular ray, Doppler velocities must be available on at least two neighboring rays (say, within plus or minus 6 rays of the subject ray) for the gate in question.

SEE ALSO

Raduf(1), hrdrad(1).