netsse.analys.buoy#
Functions to process wave buoy motion signals into directional wave spectra.
Copyright (C) 2023-2026 Technical University of Denmark, R.E.G. Mounet
This code is part of the NetSSE software.
NetSSE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
NetSSE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
To credit the author, users are encouraged to use below reference:
Mounet, R. E. G., & Nielsen, U. D. NetSSE: An open-source Python package
for network-based sea state estimation from ships, buoys, and other
observation platforms (version 2.2). Technical University of Denmark,
GitLab. February 2026. https://doi.org/10.11583/DTU.26379811.
Last updated on 20-02-2026 by R.E.G. Mounet
Functions#
|
Infers the parameters of the directional spreading distribution function |
|
Reconstructs the directional spreading function based on the first four Fourier |
Computes the Fourier coefficients from the cross-spectra of a |
|
|
Infers the Fourier coefficients from the parameters of the directional |
Module Contents#
- netsse.analys.buoy.Fourier2spread_dist_params(a1, b1, a2, b2)[source]#
Infers the parameters of the directional spreading distribution function from the Fourier coefficients, as per Kuik et al. (1988).
- Parameters:
a1 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
b1 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
a2 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
b2 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
- Returns:
alpha (array_like of shape (Nf,)) – Wave direction [rad].
sigma (array_like of shape (Nf,)) – Directional spread [rad].
gamma (array_like of shape (Nf,)) – Skewness of the directional distribution [-].
delta (array_like of shape (Nf,)) – Kurtosis of the directional distribution [-].
See also
spread_dist_params2FourierInfers the Fourier coefficients from the parameters of the directional spreading distribution function.
References
Kuik, A. J., van Vledder, G. P., & Holthuijsen, L. H. (1988). A Method for the Routine Analysis of Pitch-and-Roll Buoy Wave Data. Journal of Physical Oceanography, 18(7), 1020–1034.
Example
>>> [alpha, sigma, gamma, delta] = Fourier2spread_dist_params(a1,b1,a2,b2)
- netsse.analys.buoy.Shannon_MEMII_Newton(a1, a2, b1, b2, freq, theta, maxiter, tol_error, miniter=50, approx=False)[source]#
Reconstructs the directional spreading function based on the first four Fourier coefficients of a directional wave spectrum.
The function implements the Maximum Entropy Principle (Hashimoto, 1997), either via running the Newton local linearisation method or following the approximation method by Kim et al. (1994).
- Parameters:
a1 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
a2 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
b1 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
b2 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
freq (array_like of shape (Nf,)) – Vector of (discretized) wave frequencies [Hz].
theta (array_like of shape (Ntheta,)) – Vector of wave headings [deg].
maxiter (int) – Maximum number of iterations.
tol_error (float) – Tolerance in the relative error.
miniter (int, default 50) – Minimum number of iterations.
approx (bool, default False) – Boolean which indicates whether the approximation method should be used for finding the Lagrangian multipliers.
- Returns:
D (array_like of shape (Nf,Ntheta)) – Directional spreading function.
flag (array_like of shape (Nf,)) – Boolean flag indicating unconverged frequencies (
flag = 0for unconverged)L1, L2, L3, L4 (array_like of shape (Nf,)) – Optimized Lagrange multipliers.
See also
cross_spec2Fourier_coefComputes the Fourier coefficients from the cross-spectra of a heave-East-North wave buoy.
netsse.analys.emep.emepExtended Maximum Entropy Principle (EMEP) method for reconstructing the directional spreading function based on the cross-power spectra of measured wave-induced responses.
References
Benoit, M., Frigaard, P., & Schäffer, H. A. (1997). Analysing Multidirectional Wave Spectra: A tentative classification of available methods. Proceedings of the 27th IAHR Congress, San Francisco, CA, USA (pp. 131–158). Canadian Government Publishing.
Hashimoto, N. (1997). Analysis of the Directional Wave Spectrum from Field Data. Advances in coastal and ocean engineering. 3:103-44.
Kim, T., Lin, L.-H., & Wang, H. (1994). Application of Maximum Entropy Method to the Real Sea Data. In Coastal Engineering (pp. 340–355).
Example
>>> D, flag, L1, L2, L3, L4 = ... Shannon_MEMII_Newton(a1,a2,b1,b2,freq,theta,maxiter,tol_error,miniter=50,False)
- netsse.analys.buoy.cross_spec2Fourier_coef(Gf)[source]#
Computes the Fourier coefficients from the cross-spectra of a heave-East-North wave buoy, as per Benoit et al. (1997).
- Parameters:
Gf (array_like of shape (3,3,Nf)) – Cross-spectra (Heave-East-North), as a function of frequency in Hertz.
- Returns:
Sf (array_like of shape (Nf,)) – One-sided variance spectrum of the waves [m^2.s], as a function of frequency in Hertz.
a1, a2, b1, b2 (array_like of shape (Nf,)) – Frequency-dependent Fourier coefficients of the directional wave spectrum.
See also
Shannon_MEMII_NewtonReconstructs the directional spreading function based on the first four Fourier coefficients of a directional wave spectrum.
References
Benoit, M., Frigaard, P., & Schäffer, H. A. (1997). Analysing Multidirectional Wave Spectra: A tentative classification of available methods. Proceedings of the 27th IAHR Congress, San Francisco, CA, USA (pp. 131–158). Canadian Government Publishing.
Example
>>> Sf, a1, a2, b1, b2 = cross_spec2Fourier_coef(Gf)
- netsse.analys.buoy.spread_dist_params2Fourier(alpha, sigma, gamma, delta, unit='rad')[source]#
Infers the Fourier coefficients from the parameters of the directional spreading distribution function, as per Kuik et al. (1988).
- Parameters:
alpha (array_like of shape (Nf,)) – Wave direction [rad, or deg].
sigma (array_like of shape (Nf,)) – Directional spread [rad, or deg].
gamma (array_like of shape (Nf,)) – Skewness of the directional distribution [-].
delta (array_like of shape (Nf,)) – Kurtosis of the directional distribution [-].
unit ({'rad','deg'}, optional) – Unit of the wave direction and directional spread:
'deg'or'rad'(default).
- Returns:
a1, b1, a2, b2 – First four Fourier coefficients of the directional wave spectrum.
- Return type:
array_like of shape (Nf,)
See also
Fourier2spread_dist_paramsInfers the parameters of the directional spreading distribution function from the Fourier coefficients.
Shannon_MEMII_NewtonReconstructs the directional spreading function based on the first four Fourier coefficients of a directional wave spectrum.
References
Kuik, A. J., van Vledder, G. P., & Holthuijsen, L. H. (1988). A Method for the Routine Analysis of Pitch-and-Roll Buoy Wave Data. Journal of Physical Oceanography, 18(7), 1020–1034.
Example
>>> [a1,b1,a2,b2] = spread_dist_params2Fourier(alpha,sigma,gamma,delta,unit)