query_Vs_given_thk#
- PySeismoSoil.helper_site_response.query_Vs_given_thk(vs_profile: ndarray, thk: float | numpy.ndarray, n_layers: int | None = None, at_midpoint: bool = True) tuple[numpy.ndarray, numpy.ndarray][source]#
Query Vs values from a thickness array “
thk”. The starting point of querying is the ground surface.- Parameters:
vs_profile (np.ndarray) –
- Shear-wave velocity profile, containing at least two columns:
thickness of layers
shear wave velocity of layers
thk (float | np.ndarray) – Thickness array, or a single value that means a constant thickness.
n_layers (int | None) – Number of layers to query. This parameter has no effect if
thkis a numpy array (because the number of layers can be inferred fromthk).at_midpoint (bool) – If
True, the Vs values are queried at the mid-point depths of each layer. IfFalse, at the top of each layer.
- Returns:
vs_array (np.ndarray) – Vs values corresponding to the given depths. Its type depends on
as_profile.thk_array (np.ndarray) – The constructed thickness array (if
thkis a scalar), orthkitself, ifthkis already an array.
- Raises:
TypeError – When the types of input parameters are incorrect
ValueError – When n_layers is not positive