5. Processing radar arrays

Note

This section covers some rudimentary (and some more complex) preprocessing methods. Note that these are only a few of the most common methods. If you would like to see another method added here, please open a github issue and briefly explain the method, preferably including the math involved.

5.1. Stacking

Stacking is the process of adding a number of successive neighboring trace columns together, both in order to reduce noise (by cancelling out random variation in neighboring cells) and to condense the X-axis of the radar array. This is very useful in lines with a high number of traces, as it both helps accentuate returns and make the long axis viewable on a reasonable amount of screen space.

The stacking algorithm is available in readgssi by using the stack= argument in Python or the -s flag in bash. This program contains two methods of stacking: automatic and manual.

5.1.1. Autostacking

The automatic stacking method checks the ratio of width to height and if it’s above 2.5:1, sets the stacking parameter roughly equal to 2.5:1. This can reduce the hassle of trying a number of different stacking values like in RADAN. In Python, this is accessible via the stack=’auto’ argument, while in bash, the flag is -f auto.

The file used in Basic plotting in the previous section shows the full length of the survey line. Below is the result of autostacking that line and turning the gain up (explained in Setting gain).

readgssi.readgssi(infile='DZT__001.DZT', outfile='1a.png', frmt=None,
                  zero=[233], plot=5, gain=60, stack='auto')
readgssi -i DZT__001.DZT -o 1a.png -Z 233 -p 5 -g 60 -s auto
Autostacking (6 times)

5.1.2. Stacking manually

Sometimes it is preferable to stack a plot a specific number of times determined by the user. Occasionally, you may want to create plots that are longer (have less stacking) or shorter (have more stacking) than the auto method. The example above is stacked 6 times, here we will stack half that amount (i.e. the X-axis will be longer). In python: stack=3; in bash: -s 3.

readgssi.readgssi(infile='DZT__001.DZT', outfile='1b.png', frmt=None,
                  zero=[233], plot=5, gain=60, stack=3)
readgssi -i DZT__001.DZT -o 1b.png -Z 233 -p 5 -g 60 -s 3
Manually stacking 3 times

Back to top ↑

5.2. Getting rid of horizontal noise

5.2.1. Horizontal average filters (BGR)

Horizontal average filters, also known as background removal or BGR, are commonly used to remove both low-frequency skew and higher frequency horizontal reverberation banding that can occur in some survey environments. In this program there are two types of BGR: full-width average and moving window average. The former resembles RADAN’s simplest BGR algorithm, while the latter emulates its BOXCAR style filter.

5.2.1.1. Full-width

The full-width BGR filter in readgssi simply takes the average of each row in the array and subtracts that value from the row values themselves, essentially moving their mean value to zero. This can work well in some environments but can cause additional horizontal banding if strongly reflective layers are horizontal for many consecutive traces.

readgssi.readgssi(infile='DZT__001.DZT', outfile='2a.png', frmt=None,
                  zero=[233], plot=5, stack='auto', gain=60,
                  bgr=0)
readgssi -i DZT__001.DZT -o 2a.png -Z 233 -p 5 -s auto -g 60 -r 0
Full-width BGR

5.2.1.2. Boxcar/moving window

The boxcar-style method is preferred by many because although it has a tendancy to wipe out data that’s too strongly horizontal, it also removes more noise from areas of weak returns and can help make the profile look cleaner. The side effect of this is that it causes artificial wisps on either side of non-horizontal objects, about the size of half the window, and that it can wipe out horizontal layers that are longer than the window length. If you find that it turns horizontal layers into indistinguishable mush, increase the window size and try again.

readgssi.readgssi(infile='DZT__001.DZT', outfile='2b.png', frmt=None,
                  zero=[233], plot=5, stack='auto', gain=60,
                  bgr=100)
readgssi -i DZT__001.DZT -o 2b.png -Z 233 -p 5 -s auto -g 60 -r 100
Boxcar/moving window BGR

5.2.2. Frequency filter (vertical triangular bandpass)

The vertical filter is more sophisticated and requires proper identification of the antenna’s center frequency. Because antennas emit bands of frequencies centered around the manufacturer’s specified center frequency, data will often lie within those frequencies. However, noise at other frequency bands is sometimes picked up, whether due to the dielectric of the first layer, or external sources. Often it will be necessary to let pass only the frequencies around the center frequency.

For a 100 MHz antenna, this band can be as wide as 70-130 MHz at low dielectric values. Open water profiles are often much cleaner after being filtered approximately 80% as high as those in higher dielectric media, approximately 60-100 MHz.

readgssi.readgssi(infile='DZT__001.DZT', outfile='2c.png', frmt=None,
                  zero=[233], plot=5, stack='auto', gain=60,
                  freqmin=60, freqmax=100)
readgssi -i DZT__001.DZT -o 2c.png -Z 233 -p 5 -s auto -g 60 -t 60-100
Vertical triangular bandpass

5.2.3. Combining filters

It’s typically worthwhile to play with combining filters, as often they can have a compounding effect on cleaning up the profile. See for example what the application of both the horizontal moving window and the vertical triangular filter can do to make the water column of this lake profile look clean enough to see thermoclines:

readgssi.readgssi(infile='DZT__001.DZT', outfile='2c.png', frmt=None,
                  zero=[233], plot=5, stack='auto', gain=60, dpi=300,
                  bgr=100, freqmin=60, freqmax=100)
readgssi -i DZT__001.DZT -o 2c.png -Z 233 -p 5 -s auto -g 60 -D 300 -r 100 -t 60-100
Both horizontal and vertical filters

Back to top ↑

5.3. Distance normalization

If your files are recorded as time-triggered such as in the case of this lake profile, they need to be distance-normalized before they can be rendered with distance on the X-axis. This can only be done if there is proper GPS information in DZG format.

The relevant function is readgssi.arrayops.distance_normalize, accessible with normalize=True or -N, which calculates the distance traveled between GPS marks and resamples the array to a normalized state, then calculates the new samples per meter value and applies that to the header. The resulting corrected array can be displayed in distance units with x=’m’ or -x m.

Warning

Do not use x=’m’ or -x m without either a DMI or distance normalization, as the file header samples per meter value could be very wrong (and in some cases will surely be wrong due to how RADAN handles distance, which has known flaws).

Note

Recording GPS information with a GSSI system that does not have GPS input is not recommended. However, GPS marks can be aligned with user marks in GSSI files if the user can record GPS and radar mark information at the same time every set number of meters traveled. GPX (GPS exchange format) files with identical marks to GSSI files can be cross-correlated to DZG by using the gpx2dzg software package.

This example distance normalizes and displays the X-axis in meters. Note the change in the beginning of the line, in which the slope appears longer than it really is due to slower survey speed at the start of the line.

readgssi.readgssi(infile='DZT__001.DZT', outfile='2c.png', frmt=None,
                  zero=[233], plot=5, stack='auto', gain=60,
                  normalize=True, x='m')
readgssi -i DZT__001.DZT -o 3a.png -Z 233 -p 5 -s auto -g 60 -N -x m
Vertical triangular bandpass

5.3.1. X axis distance units

The X-axis can be modified to display various distance units. These include: kilometers/km, meters/m, and centimeters/cm. To use these, set x=’km’ / -x km, x=’m’ / -x m, or x=’cm’ / -x cm.

See warning above for caveats about using distance units.

Back to top ↑

5.4. Reversing

Sometimes it is necessary to reverse the travel direction of a survey line in order to show a comparison with a line that travels in the opposite direction. readgssi will read arrays backwards if reverse=True or -R are set, using the readgssi.arrayops.flip() function.

readgssi.readgssi(infile='DZT__001.DZT', outfile='4a.png', frmt=None,
                  zero=[233], plot=5, stack='auto', gain=60,
                  reverse=True)
readgssi -i DZT__001.DZT -o 4a.png -Z 233 -p 5 -s auto -g 60 -R
Vertical triangular bandpass

Back to top ↑