readgssi.arrayops
(array manipulation)¶
-
readgssi.arrayops.
distance_normalize
(header, ar, gps, verbose=False)¶ Distance normalization algorithm. Uses a GPS array to calculate expansion and contraction needed to convert from time-triggered to distance-normalized sampling interval. Then, the samples per meter is recalculated and inserted into the header for proper plotting.
Usage described in the Distance normalization section of the tutorial.
- Parameters
header (dict) – Input data array
ar (numpy.ndarray) – Input data array
gps (pandas.DataFrame) – GPS data from
readgssi.gps.readdzg()
. This is used to calculate the expansion and compression needed to normalize traces to distance.verbose (bool) – Verbose, defaults to False.
- Return type
header (
dict
), radar array (numpy.ndarray
), gps (False orpandas.DataFrame
)
-
readgssi.arrayops.
flip
(ar, verbose=False)¶ Read the array backwards. Used to reverse line direction. Usage covered in the Reversing tutorial section.
- Parameters
ar (numpy.ndarray) – Input data array
verbose (bool) – Verbose, defaults to False
- Return type
radar array (
numpy.ndarray
)
-
readgssi.arrayops.
reducex
(ar, header, by=1, chnum=1, number=1, verbose=False)¶ Reduce the number of traces in the array by a number. Not the same as
stack()
since it doesn’t sum adjacent traces, howeverstack()
uses it to resize the array prior to stacking.Used by
stack()
anddistance_normalize()
but not accessible from the command line orreadgssi.readgssi()
.- Parameters
ar (numpy.ndarray) – Input data array
by (int) – Factor to reduce by. Default is 1.
chnum (int) – Chunk number to display in console. Default is 1.
number (int) – Number of chunks to display in console. Default is 1.
verbose (bool) – Verbose, defaults to False.
- Return type
radar array (
numpy.ndarray
)
-
readgssi.arrayops.
stack
(ar, header, stack='auto', verbose=False)¶ Stacking algorithm. Stacking is the process of summing adjacent traces in order to reduce noise — the thought being that random noise around zero will cancel out and data will either add or subtract, making it easier to discern.
It is also useful for displaying long lines on a computer screen. Usage is covered in the Stacking section of the tutorial.
stack='auto'
results in an approximately 2.5:1 x:y axis ratio.stack=3
sums three adjacent traces into a single trace across the width of the array.- Parameters
ar (numpy.ndarray) – Input data array
by (int) – Factor to stack by. Default is “auto”.
- Return type
radar array (
numpy.ndarray
)