Module sprit.sprit_calibration

This module will be used for calibration of the ambient HVSR data acquired near wells to derive a relation between the resonant frequency and the depth to bedrock beneath the subsurface.

Functions

def calculate_depth(freq_input, depth_model='ISGS_All', freq_col='Peak', calculate_depth_in_feet=False, calculate_elevation=True, show_depth_curve=True, surface_elevation_data='Elevation', bedrock_elevation_column='BedrockElevation', depth_column='BedrockDepth', verbose=False, export_path=None, swave_velocity=563.0, decimal_places=3, depth_model_in_latex=False, fig=None, ax=None, **kwargs)

Calculate depth(s) based on a frequency input (usually HVSRData or HVSRBatch oject) and a frequency-depth depth_model (usually a power law relationship).

Parameters

freq_input : HVSRData, HVSRBatch, float, int, or filepath, optional
Input with frequency information, by default {sprit_hvsr.HVSRData, sprit_hvsr.HVSRBatch, float, os.PathLike}
depth_model : str, tuple, list, or dict, optional
Model describing a relationship between frequency and depth, by default "ISGS_All"
calculate_depth_in_feet : bool, optional
Whether to calculate depth in feet (in addition to meters, which is done by default)
freq_col : str, optional
Name of the column containing the frequency information of the peak, by default "Peak" (per HVSRData.Table_Report output)
calculate_elevation : bool, optional
Whether or not to calculate elevation, by default True
surface_elevation_data : str or numeric, optional
The name of the column or a manually specified numeric value to use for the surface elevation value, by default "Elevation"
bedrock_elevation_column : str, optional
The name of the column in the TableReport for the bedrock elevation of the point. This can be either the name of a column in a table (i.e., Table_Report) or a numeric value, by default "BedrockElevation"
depth_column : str, optional
description, by default "BedrockDepth"
verbose : bool, optional
Whether or not to print information about the processing to the terminal, by default False
export_path : _type_, optional
description, by default None
swave_velocity : float, optional
Shear wave velocity to use for depth calculations in meters/second, if using the quarter wavelength shear wave velocity method, by default 563.0
decimal_places : int, optional
Number of decimal places to round depth results, by default 3

Returns

HVSRBatch or list if those are input; otherwise, HVSRData object
The returns are the same type as freq_input, except filepath which returns pandas.DataFrame
def calibrate(calib_filepath, calib_type='power', peak_freq_col='PeakFrequency', calib_depth_col='Bedrock_Depth', outlier_radius=None, xcoord_col='xcoord', ycoord_col='ycoord', bedrock_type=None, show_calibration_plot=True)

The calibrate function allows input of table with f0 and known depths to generate a power-law regression relationship.

Parameters

calib_filepath : pathlike object
Path to file readable by pandas.read_csv() with a column for frequencies and a column for depths.
calib_type : str, optional
Which calibration to use. Currently only power-law is supported, by default "power"
outlier_radius : None or float, optional
Radius (in CRS of coordinates) within which to use the points for calibration, by default None. Not currently supported.
bedrock_type : str or None, optional
Bedrock type by which to select which points to use for calibration, by default None. Not currently supported.
peak_freq_col : str, optional
Which column in calib_filepath to use for fundamental frequency values, by default "PeakFrequency"
calib_depth_col : str, optional
Which column in calib_filepath to use for depth values, by default "Bedrock_Depth"
show_calibration_plot : bool, optional
Whether to show the calibration plot, by default True

Returns

tuple
Tuple (a, b) containing the parameters used for calibration regression.
def power_law(f, a, b)