netsse.analys.spec.spec1d_to_params =================================== .. py:function:: netsse.analys.spec.spec1d_to_params(S, freq, unit_freq='rad/s', smooth_Tp=False) Computes the main sea state parameters from a given 1-D wave spectrum. :param S: 1-D wave spectrum. If ``S`` has more than one dimension, then one axis must have a length Nfreq. :type S: array_like :param freq: Set of discretized frequencies. :type freq: array_like of shape (Nfreq,) :param unit_freq: Unit of the frequencies: - 'rad/s' : The variable ``freq`` denotes the circular frequencies in radians per second. - 'Hz' : The 1-D wave spectrum is expressed as a function of frequency in Hertz. :type unit_freq: {'rad/s','Hz'}, optional :param smooth_Tp: Specify whether the output ``Tp`` value should be smoothened by fitting a polynomial of order 3 in the vicinity of the spectral peak and estimating the peak period through the fitted polynomial. :type smooth_Tp: bool, default False :returns: * **m** (*array_like of shape (6,...,)*) -- Spectral moments :math:`[m_{-1},m_0,m_1,m_2,m_3,m_4]`. * **Hm0** (*float, or array_like*) -- Spectral significant wave height [m]. * **Tp** (*float, or array_like*) -- Peak wave period [s]. * **Tm01** (*float, or array_like*) -- Mean wave period [s]. * **Tm02** (*float, or array_like*) -- Zero up-crossing period [s]. * **Tm24** (*float, or array_like*) -- Mean crest period [s]. * **TE** (*float, or array_like*) -- Mean energy period [s]. * **Sm02** (*float, or array_like*) -- Significant wave steepness [-]. * **epsilon** (*float, or array_like*) -- Spectral bandwidth [-]. * **Qp** (*float, or array_like*) -- Goda's peakedness parameter [-]. .. seealso:: :obj:`spec2d_to_params` Computes a set of overall parameters characterizing the sea state from the 2-D wave spectrum. .. rubric:: Example >>> m, Hm0, Tp, Tm01, Tm02, Tm24, TE, Sm02, epsilon, Qp = ... spec1d_to_params(S,freq,unit_freq='rad/s',smooth_Tp=False)