netsse.analys.spec.spec2d_to_spread_dist#
- netsse.analys.spec.spec2d_to_spread_dist(S2D, theta)#
Converts the given 2-D wave spectrum into a directional spreading function and a 1-D wave spectrum.
- Parameters:
S2D (array_like of shape (...,Nf,Ntheta,...)) – Directional wave spectrum, as a function of frequency and wave direction (with arbitrary units).
theta (array_like of shape (Ntheta,)) – Vector of wave headings (with arbitrary unit).
- Returns:
Sf (array_like of shape (…,Nf,…)) – One-sided variance spectrum of the waves, as a function of frequency.
D (array_like of shape (…,Nf,Ntheta,…)) – Directional spreading function.
See also
spread_dist_to_spec2d
Converts the given 1-D wave spectrum and directional spreading function into a 2-D wave spectrum.
Example
>>> Sf, D = spec2d_to_spread_dist(S2D,theta)