gnatss.ops.harmonic_mean module#
- gnatss.ops.harmonic_mean.sv_harmonic_mean(svdf: DataFrame, start_depth: float, end_depth: float, method: Literal['scipy', 'numba'] = 'numba') float#
Computes harmonic mean from a sound profile containing depth (dd) and sound speed (sv)
- Parameters:
- svdfpd.DataFrame
Sound speed profile data as dataframe
- start_depthint or float
The start depth for harmonic mean to be computed
- end_depthint or float
The end depth for harmonic mean to be computed
- method{“scipy”, “numba”}, default “numba”
The method to use for computing the harmonic mean. The options are “scipy” and “numba”.
“scipy” uses scipy.stats.hmean method. “numba” uses numba.njit method and it’s an equivalent algorithm, to the original fortran implementation.
- Returns:
- float
The sound speed harmonic mean value