readgssi.readgssi (main module)¶
This function gathers and parses command line arguments with which to create function calls. It is not for use from the python console.
readgssi(infile, outfile=None, verbose=False, antfreq=None, frmt='python', plotting=False, figsize=7, dpi=150, stack=1, x='seconds', z='nanoseconds', histogram=False, colormap='gray', colorbar=False, zero=[None, None, None, None], gain=1, freqmin=None, freqmax=None, reverse=False, bgr=False, win=0, dewow=False, absval=False, normalize=False, specgram=False, noshow=False, spm=None, start_scan=0, num_scans=- 1, epsr=None, title=True, zoom=[0, 0, 0, 0], pausecorrect=False, showmarks=False)¶
This is the primary directive function. It coordinates calls to reading, filtering, translation, and plotting functions, and should be used as the overarching processing function in most cases.
infile (str) – Input DZT data file
outfile (str) – Base output file name for plots, CSVs, and other products. Defaults to
None, which will cause the output filename to take a form similar to the input. The default will let the file be named via the descriptive naming function
verbose (bool) – Whether or not to display (a lot of) information about the workings of the program. Defaults to
False. Can be helpful for debugging but also to see various header values and processes taking place.
antfreq (int) – User setting for antenna frequency. Defaults to
None, which will cause the program to try to determine the frequency from the antenna name in the header of the input file. If the antenna name is not in the dictionary
readgssi.constants.ANT, the function will try to determine the frequency by decoding integers in the antenna name string.
frmt (str) – The output format to be passed to
readgssi.translate. Defaults to
None. Presently, this can be set to
'object'(which will return the header dictionary, the image arrays, and the gps coordinates as objects). Plotting will not interfere with output (i.e. you can output to CSV and plot a PNG in the same command).
dpi (int) – Dots per inch (DPI) for figure creation.
stack (int) – Number of consecutive traces to stack (horizontally) using
readgssi.arrayops.stack(). Defaults to 1 (no stacking). Especially good for handling long radar lines. Algorithm combines consecutive traces together using addition, which reduces noise and enhances signal. The more stacking is done, generally the clearer signal will become. The tradeoff is that you will reduce the length of the X-axis. Sometimes this is desirable (i.e. for long survey lines).
x (str) – The units to display on the x-axis during plotting. Defaults to
x='seconds'. Acceptable values are
x='distance'(which sets to meters),
'meters', etc., for distance;
'time'for seconds, and
z (str) – The units to display on the z-axis during plotting. Defaults to
z='nanoseconds'. Acceptable values are
z='depth'(which sets to meters),
'meters', etc., for depth;
'time'for seconds, and
histogram (bool) – Whether to plot a histogram of array values at plot time.
matplotlib.colors.Colormap) – Plot using a Matplotlib colormap. Defaults to
graywhich is colorblind-friendly and behaves similarly to the RADAN default, but
seismicis a favorite of many due to its diverging nature.
colorbar (bool) – Whether to display a graded color bar at plot time.
zero (list[int,int,int,int]) – A list of values representing the amount of samples to slice off each channel. Defaults to
Nonefor all channels, which will end up being set by the
gain (int) – The amount of gain applied to plots. Defaults to 1. Gain is applied as a ratio of the standard deviation of radargram values to the value set here.
win (int) – Window size for background removal filter (
win=0, the full-width row average will be subtracted from each row. If
win=50, a moving window will calculate the average of 25 cells on either side of the current cell, and subtract that average from the cell value, using
cval=0. This is useful for removing non-uniform horizontal average, but the tradeoff is that it creates ghost data half the window size away from vertical figures, and that a window size set too low will obscure any horizontal layering longer than the window size.
specgram (bool) – Produce a spectrogram of a trace in the array using
readgssi.plot.spectrogram(). Defaults to
True, defaults to a trace roughly halfway across the profile). This is mostly for debugging and is not currently accessible from the command line.
spm (float) – User-set samples per meter. This overrides the value read from the header, and typically doesn’t need to be set if the samples per meter value was set correctly at survey time. This value does not need to be set if GPS input (DZG file) is present and the user sets
start_scan (int) – zero based start scan to read data from. Defaults to zero.
num_scans (int) – number of scans to read from the file, Defaults to -1, which reads from start_scan to end of file.
epsr (float) – Epsilon_r, otherwise known as relative permittivity, or dielectric constant. This determines the speed at which waves travel through the first medium they encounter. It is used to calculate the profile depth if depth units are specified on the Z-axis of plots.
zoom (list[int,int,int,int]) – Zoom extents to set programmatically for matplotlib plots. Must pass a list of four integers:
[left, right, up, down]. Since the z-axis begins at the top, the “up” value is actually the one that displays lower on the page. All four values are axis units, so if you are working in nanoseconds, 10 will set a limit 10 nanoseconds down. If your x-axis is in seconds, 6 will set a limit 6 seconds from the start of the survey. It may be helpful to display the matplotlib interactive window at full extents first, to determine appropriate extents to set for this parameter. If extents are set outside the boundaries of the image, they will be set back to the boundaries. If two extents on the same axis are the same, the program will default to plotting full extents for that axis.
- Return type