Conversions of radar data¶
A bunch of radar-related conversions
-
pygssi.lib.conversionlib.
data_to_db
(data, p1=None)[source]¶ Convert data to decibels
Parameters: - data (numpy.ndarray) – The data you want to convert
- p1 (float, optional) – The “zero” value for the scale. If none, use the mean of data
-
pygssi.lib.conversionlib.
gained_decibels
(gainpoints, data, p1=None, recenter=True)[source]¶ Apply gain and convert to decibels
Parameters: - gainpoints (str) – A string of comma-separated floats for the gainpoints. These get evenly distributed across depths. They are applied exponentially
- data (numpy.ndarray) – The sample data
- p1 (float, optional) – The “zero” value for the scale. If none, use the mean of data
- recenter (bool, optional) – If true (default), subtract the mean after gaining to center the data on zero
-
pygssi.lib.conversionlib.
to_date
(bin, le=True)[source]¶ Convert the GSSI date format to a
datetime.datetime
objectParameters: bin (bits) – The gssi binary date Returns: time – The time from the header Return type: datetime.datetime
-
pygssi.lib.conversionlib.
tt_to_m_variable_arr
(diel_array, tt_arr, conv_to_sec=1e-09)[source]¶ Convert two-way travel time to distance using a variable dielectric constant
Note that this function is very much not elegant, but I think that it should not be too slow unless you dielectric array is very large
Parameters: - diel_array (numpy.ndarray) – An nx2 array where the first column is the depth and the second column is the dielectric constant
- tt_array (numpy.ndarray) – An mxn array of two-way travel times (typically mx1)
- conv_to_sec (float, optional) – Conversion factor to get from travel-time to seconds (default is assume in nanoseconds, which should be GSSI standard)