query_Vs_at_depth#

PySeismoSoil.helper_site_response.query_Vs_at_depth(vs_profile: ndarray, depth: float | numpy.ndarray) tuple[float | numpy.ndarray, bool, bool, bool][source]#

Query Vs values at given depth values from a Vs profile. If the given depth values happen to be at layer interfaces, return the Vs of the layer below the interface.

Parameters:
  • vs_profile (np.ndarray) –

    Shear-wave velocity profile, containing at least two columns:
    1. thickness of layers

    2. shear wave velocity of layers

  • depth (float | np.ndarray) – Value(s) of depths to query the Vs value at. Unit should be m.

Returns:

  • vs_array (float | np.ndarray) – Vs values corresponding to the given depths. Its type depends on the type of depth.

  • is_scalar (bool) – Whether the given depth is a scalar or not.

  • has_duplicate_values (bool) – Whether depth has duplicate values.

  • is_sorted (bool) – Whether depth is sorted (ascending).

Raises:
  • TypeError – When the type of depth is incorrect

  • ValueError – When there are negative depth` values.