%matplotlib notebook
import numpy as np
import wafo.data as wd
import wafo.stats as ws
import matplotlib.pyplot as plt
# import mpld3
# mpld3.enable_notebook() # Enable interactive plots
Of particular interest in wave analysis is how to find extreme quantiles and extreme significant values for a wave series. Often this implies going outside the range of observed data, i.e. to predict, from a limited number of observations, how large the extreme values might be. Such analysis is commonly known as Weibull analysis or Gumbel analysis, from the names of two familiar extreme value distributions. WAFO contains routines for fitting of such distributions, both for the Weibull and Gumbel distributions, and for two more general classes of distributions, the Generalized Pareto Distribution (GPD) and the Generalized Extreme Value distribution (GEV).
Significant wave-height data on Weibull paper, on Gumbel paper and logarithm of data on Normal probability paper:
fig, ax = plt.subplots(2, 2, figsize=(11, 8))
Hs = wd.atlantic()
wei = ws.weibull_min.fit2(Hs)
gum = ws.gumbel_r.fit2(Hs)
axf = ax.ravel()
tmp = ws.probplot(Hs, wei.par, dist='weibull_min', plot=axf[0])
axf[0].set_title('Weibull Probability Plot')
tmp = ws.probplot(Hs, gum.par, dist='gumbel_r', plot=axf[1])
axf[1].set_title('Gumbel Probability Plot')
tmp = ws.probplot(np.log(Hs), plot=axf[2])
_=axf[2].set_title('Normal Probability Plot')
c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:1616: UserWarning: P-value is on the conservative side (i.e. too large) due to ties in the data! 'P-value is on the conservative side (i.e. too large) due to' +
Return values in the Gumbel distribution
fig, axes = plt.subplots()
T=np.r_[2:100001]
# print(gum.par)
# sT=gum.par[1] - gum.par[0]*np.log(-np.log1p(-1./T));
sT = gum.isf(1./T)
plt.semilogx(T,sT)
N=np.r_[1:len(Hs)+1];
Nmax=max(N);
plt.plot(Nmax/N, sorted(Hs, reverse=True),'.')
plt.title('Return values in the Gumbel model')
plt.xlabel('Return period')
_=plt.ylabel('Return value')
gev = ws.genextreme.fit2(Hs)
fig, axes = plt.subplots()
gev.plotesf(plot_ci=True)
c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:1616: UserWarning: P-value is on the conservative side (i.e. too large) due to ties in the data! 'P-value is on the conservative side (i.e. too large) due to' +
import wafo.kdetools as wk
fig, axes = plt.subplots()
wk.TKDE(Hs, L2=0.5)(output='plot').plot('g--')
gev.plotepdf()
Analysis of yura87 wave data. Wave data interpolated (spline) and organized in 5-minute intervals Normalized to mean 0 and std = 1 to get stationary conditions. maximum level over each 5-minute interval analysed by GEV
import scipy.interpolate as si
xn = wd.yura87()
XI = np.r_[0:len(xn):0.25]
N = len(XI)
n_5min = 4 * 60 * 5 # 5 min of data
N = N - np.mod(N, n_5min);
YI = si.UnivariateSpline(xn[:,0].ravel(), xn[:,1].ravel(), k=3,s=0)(XI[:N])
YI = np.reshape(YI, (n_5min, N//n_5min)) # Each column holds 5 minutes of interpolated data.
Y5 = (YI-YI.mean(axis=0))/(YI.std(axis=0))
Y5M = Y5.max(axis=0)
Y5gev = ws.genextreme.fit2(Y5M,method='mps')
fig, axes = plt.subplots()
Y5gev.plotesf(plot_ci=True)
Exceedances of significant wave-height data over level 3.
gpd3 = ws.genpareto.fit2(Hs[Hs>3],floc=3, method='mps')
fig, axes = plt.subplots()
gpd3.plotesf(plot_ci=True)
c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:1616: UserWarning: P-value is on the conservative side (i.e. too large) due to ties in the data! 'P-value is on the conservative side (i.e. too large) due to' +
c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02073033 3. -1.15182041], par_old= [-0.01928403 3. 2.47860887], dl = 0.1290919863245108) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02536551 3. -1.15507444], par_old= [-0.02073033 3. -1.15182041], dl = 0.2055078825706005) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02568576 3. -1.15832848], par_old= [-0.02536551 3. -1.15507444], dl = 0.06246811375331163) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02857541 3. -1.15995549], par_old= [-0.02568576 3. -1.15832848], dl = 0.07317766471123832) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02941303 3. -1.16320952], par_old= [-0.02857541 3. -1.15995549], dl = 0.28050290841883907) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.0344965 3. -1.16646356], par_old= [-0.02941303 3. -1.16320952], dl = 0.25696579348641535) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03455019 3. -1.16809057], par_old= [-0.0344965 3. -1.16646356], dl = 0.19732346152977698) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03638567 3. -1.16971759], par_old= [-0.03455019 3. -1.16809057], dl = 0.15750443359047495) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04404576 3. -1.17297162], par_old= [-0.03638567 3. -1.16971759], dl = 0.6234396814279535) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04679862 3. -1.17459863], par_old= [-0.04404576 3. -1.17297162], dl = 0.03812464093607559) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04913912 3. -1.17622565], par_old= [-0.04679862 3. -1.17459863], dl = 0.3676351889898797) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.05178665 3. -1.17947968], par_old= [-0.04913912 3. -1.17622565], dl = 0.20782323819003068) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.06474648 3. -1.18598775], par_old= [-0.05178665 3. -1.17947968], dl = 1.4654238916991744) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.07435728 3. -1.18924178], par_old= [-0.06474648 3. -1.18598775], dl = 0.1536050204526873) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.08227227 3. -1.19086879], par_old= [-0.07435728 3. -1.18924178], dl = 0.3414281877630856) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.08844463 3. -1.19249581], par_old= [-0.08227227 3. -1.19086879], dl = 0.5702986742376197) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.09901653 3. -1.19412283], par_old= [-0.08844463 3. -1.19249581], dl = 0.6340071316885769) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.10613153 3. -1.19574984], par_old= [-0.09901653 3. -1.19412283], dl = 0.6794889242005411) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.11276475 3. -1.19737686], par_old= [-0.10613153 3. -1.19574984], dl = 0.3393574405545223) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.12963009 3. -1.20225791], par_old= [-0.11276475 3. -1.19737686], dl = 0.4405080849192018) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.13573182 3. -1.20388492], par_old= [-0.12963009 3. -1.20225791], dl = 0.21591163866651186) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.15884867 3. -1.20551194], par_old= [-0.13573182 3. -1.20388492], dl = 0.6534142948648878) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.18663167 3. -1.20713895], par_old= [-0.15884867 3. -1.20551194], dl = 0.3434938096206679) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.19794075 3. -1.1501934 ], par_old= [-0.18663167 3. -1.20713895], dl = 1.279954993445699) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.21067931 3. -1.14531235], par_old= [-0.19794075 3. -1.1501934 ], dl = 0.02129722775089249) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.21063688 3. -1.14368533], par_old= [-0.21067931 3. -1.14531235], dl = 0.4372681424019902) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.20268766 3. -1.12621739], par_old= [-0.21063688 3. -1.14368533], dl = 0.2250522280764926) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22351576 3. -1.11405975], par_old= [-0.20268766 3. -1.12621739], dl = 0.032804554631184146) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22248826 3. -1.08366562], par_old= [-0.22351576 3. -1.11405975], dl = 0.011941283394207858) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:514: UserWarning: Upper bound is larger warnings.warn('Upper bound is larger') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02824859 3. -2.50425258], par_old= [-0.01928403 3. 2.47860887], dl = 0.3111851922453752) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03288588 3. -2.51062059], par_old= [-0.02824859 3. -2.50425258], dl = 0.14893725805177382) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.25815419 3. -2.5169886 ], par_old= [-0.03288588 3. -2.51062059], dl = 6.704811324293132) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.23516075 3. -2.52335662], par_old= [-0.25815419 3. -2.5169886 ], dl = 0.5565055907973147) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22808756 3. -2.52972463], par_old= [-0.23516075 3. -2.52335662], dl = 0.19060202333093912) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22808756 3. -2.53609264], par_old= [-0.22808756 3. -2.52972463], dl = 0.11377310573743671) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.21578054 3. -2.54882867], par_old= [-0.22808756 3. -2.53609264], dl = 0.056798409910697956) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.23196408 3. -2.55519668], par_old= [-0.21578054 3. -2.54882867], dl = 0.00761745142926884) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2348155 3. -2.56156469], par_old= [-0.23196408 3. -2.55519668], dl = 0.07027647115637592) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.21958775 3. -2.56793271], par_old= [-0.2348155 3. -2.56156469], dl = 0.21578789354907713) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.21435538 3. -2.57430072], par_old= [-0.21958775 3. -2.56793271], dl = 0.3285202074080189) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22498942 3. -2.58066873], par_old= [-0.21435538 3. -2.57430072], dl = 0.057615434845047275) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2244318 3. -2.59977277], par_old= [-0.22498942 3. -2.58066873], dl = 0.44823217469274823) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.24038722 3. -2.63161284], par_old= [-0.2244318 3. -2.59977277], dl = 0.030937537021600292) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2336123 3. -2.64434886], par_old= [-0.24038722 3. -2.63161284], dl = 0.408005336621045) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22193169 3. -2.65071688], par_old= [-0.2336123 3. -2.64434886], dl = 0.1497487765709593) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22371527 3. -2.67618893], par_old= [-0.22193169 3. -2.65071688], dl = 0.03347110994445757) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.23583271 3. -2.69529297], par_old= [-0.22371527 3. -2.67618893], dl = 0.03247692226614163) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2476247 3. -2.70166098], par_old= [-0.23583271 3. -2.69529297], dl = 0.009572679385655647) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22105854 3. -2.72076502], par_old= [-0.2476247 3. -2.70166098], dl = 0.033023720990968286) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.22955281 3. -2.73350104], par_old= [-0.22105854 3. -2.72076502], dl = 0.011529446320764691) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2316152 3. -2.73986906], par_old= [-0.22955281 3. -2.73350104], dl = 0.4111631413638861) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02050435 3. -3.84053107], par_old= [-0.01928403 3. 2.47860887], dl = 0.08911712881172207) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.0234143 3. -3.9067414], par_old= [-0.02050435 3. -3.84053107], dl = 0.1791666229146358) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02752098 3. -3.92881152], par_old= [-0.0234143 3. -3.9067414], dl = 0.3388125220481015) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03193403 3. -3.95088163], par_old= [-0.02752098 3. -3.92881152], dl = 0.35559430776311274) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.0393519 3. -3.97295174], par_old= [-0.03193403 3. -3.95088163], dl = 0.14330182507001155) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.0398438 3. -3.99502185], par_old= [-0.0393519 3. -3.97295174], dl = 0.20373775395546545) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04220953 3. -4.01709196], par_old= [-0.0398438 3. -3.99502185], dl = 0.4918512262670447) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04894614 3. -4.06123219], par_old= [-0.04220953 3. -4.01709196], dl = 0.7566757084673554) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.06619543 3. -4.10537241], par_old= [-0.04894614 3. -4.06123219], dl = 0.9349574602765642) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.06795308 3. -4.14951264], par_old= [-0.06619543 3. -4.10537241], dl = 0.2121113771599994) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.07825205 3. -4.19365286], par_old= [-0.06795308 3. -4.14951264], dl = 0.9061828601916204) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.10368397 3. -4.21572297], par_old= [-0.07825205 3. -4.19365286], dl = 0.9037198864348284) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.11017434 3. -4.23779308], par_old= [-0.10368397 3. -4.21572297], dl = 0.2873430028303119) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.11860957 3. -4.2598632 ], par_old= [-0.11017434 3. -4.23779308], dl = 0.5221583637876392) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.13754453 3. -4.30400342], par_old= [-0.11860957 3. -4.2598632 ], dl = 0.056499080666526424) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.14756822 3. -4.34814364], par_old= [-0.13754453 3. -4.30400342], dl = 0.7050293029692511) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.14802462 3. -4.39228387], par_old= [-0.14756822 3. -4.34814364], dl = 0.08559821297239978) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.15496237 3. -4.41435398], par_old= [-0.14802462 3. -4.39228387], dl = 0.11829023838254216) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.1623473 3. -4.43642409], par_old= [-0.15496237 3. -4.41435398], dl = 0.30249175619974267) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.17046472 3. -4.4584942 ], par_old= [-0.1623473 3. -4.43642409], dl = 0.025429209507365158) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.15919445 3. -4.52470454], par_old= [-0.17046472 3. -4.4584942 ], dl = 0.5593523963348161) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.15111036 3. -4.54677465], par_old= [-0.15919445 3. -4.52470454], dl = 0.07054934227744525) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.16149919 3. -4.56884477], par_old= [-0.15111036 3. -4.54677465], dl = 0.15815126808774949) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.15270506 3. -4.61298499], par_old= [-0.16149919 3. -4.56884477], dl = 0.11508056995808147) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.17106618 3. -4.65712521], par_old= [-0.15270506 3. -4.61298499], dl = 0.06851502831568723) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.16892786 3. -4.67919533], par_old= [-0.17106618 3. -4.65712521], dl = 0.09541859952923915) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.1718402 3. -4.72333555], par_old= [-0.16892786 3. -4.67919533], dl = 0.3984924055012016) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.1761362 3. -4.74540566], par_old= [-0.1718402 3. -4.72333555], dl = 0.08514669451960799) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.19607281 3. -4.811616 ], par_old= [-0.1761362 3. -4.74540566], dl = 0.2492780356114963) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2087579 3. -5.18155283], par_old= [-0.19607281 3. -4.811616 ], dl = 0.5374539990125413) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.2165035 3. -5.34445113], par_old= [-0.2087579 3. -5.18155283], dl = 0.13290765409192318) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.20838495 3. -5.50734944], par_old= [-0.2165035 3. -5.34445113], dl = 0.09652449458099) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:519: UserWarning: Number of crossings too large! Something is wrong! warnings.warn('Number of crossings too large! Something is wrong!') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.22176635 3. -11.09552663], par_old= [-0.01928403 3. 2.47860887], dl = 10.073570465338435) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.23038578 3. -15.05838245], par_old= [ -0.22176635 3. -11.09552663], dl = 0.366337118734009) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-28.83965715], p_min=[-8.08643362e+11], p=-5.180816459236603) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.14945124 3. -13.16128494], par_old= [-0.01928403 3. 2.47860887], dl = 8.48790208557466) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.17186892 3. -17.60827182], par_old= [ -0.14945124 3. -13.16128494], dl = 0.6795292340430024) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.18101611 3. -25.0347399 ], par_old= [ -0.17186892 3. -17.60827182], dl = 0.4240478943092967) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.18540003 3. -37.4369416 ], par_old= [ -0.18101611 3. -25.0347399 ], dl = 0.23792402339904584) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.18540003 3. -58.14861844], par_old= [ -0.18540003 3. -37.4369416 ], dl = 0.012272342533378833) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.18459116 3. -150.4999143 ], par_old= [ -0.18540003 3. -58.14861844], dl = 0.02100746037058343) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-33.07316648], p_min=[-9.0743307e+11], p=-6.523991096816462) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:519: UserWarning: Number of crossings too large! Something is wrong! warnings.warn('Number of crossings too large! Something is wrong!') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02917159 3. -7.9098557 ], par_old= [-0.01928403 3. 2.47860887], dl = 0.0003714045587912551) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02917141 3. -7.91934236], par_old= [-0.02917159 3. -7.9098557 ], dl = 0.030777682580719556) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03333933 3. -7.94780233], par_old= [-0.02917141 3. -7.91934236], dl = 0.02483352788567572) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02878643 3. -7.96677565], par_old= [-0.03333933 3. -7.94780233], dl = 0.3430287967321419) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03209074 3. -8.0711289 ], par_old= [-0.02878643 3. -7.96677565], dl = 0.06802000434936417) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03330041 3. -8.09010221], par_old= [-0.03209074 3. -8.0711289 ], dl = 0.0510517114121285) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03236644 3. -8.13677657], par_old= [-0.03330041 3. -8.09010221], dl = 0.11552857283004414) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03227161 3. -8.17396428], par_old= [-0.03236644 3. -8.13677657], dl = 0.3037817148533577) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.041154 3. -8.32271508], par_old= [-0.03227161 3. -8.17396428], dl = 0.17469154275386245) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04142866 3. -8.43427819], par_old= [-0.041154 3. -8.32271508], dl = 0.2666467018170806) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04298198 3. -8.47146589], par_old= [-0.04142866 3. -8.43427819], dl = 0.08998324312551631) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.04888196 3. -8.6574044 ], par_old= [-0.04298198 3. -8.47146589], dl = 0.009053150388808717) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.05378922 3. -8.6945921 ], par_old= [-0.04888196 3. -8.6574044 ], dl = 0.4341414498294398) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.05387195 3. -8.7317798 ], par_old= [-0.05378922 3. -8.6945921 ], dl = 0.31926506901982066) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.05646033 3. -8.76896751], par_old= [-0.05387195 3. -8.7317798 ], dl = 0.034807156566785125) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.0539753 3. -8.88053061], par_old= [-0.05646033 3. -8.76896751], dl = 0.07184170215987251) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.05322268 3. -8.99209372], par_old= [-0.0539753 3. -8.88053061], dl = 0.3913998788311801) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:519: UserWarning: Number of crossings too large! Something is wrong! warnings.warn('Number of crossings too large! Something is wrong!') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02434319 3. -9.30719916], par_old= [-0.01928403 3. 2.47860887], dl = 0.01700452259501617) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02555976 3. -9.31986385], par_old= [-0.02434319 3. -9.30719916], dl = 0.02573248359203717) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02492476 3. -9.34519322], par_old= [-0.02555976 3. -9.31986385], dl = 0.05041693006205605) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02731087 3. -9.38318729], par_old= [-0.02492476 3. -9.34519322], dl = 0.0761479946295367) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02765192 3. -9.39585198], par_old= [-0.02731087 3. -9.38318729], dl = 0.24806628178657775) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02538932 3. -9.44651074], par_old= [-0.02765192 3. -9.39585198], dl = 0.07654297173394298) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.02776432 3. -9.4971695 ], par_old= [-0.02538932 3. -9.44651074], dl = 0.11713947463294971) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03507539 3. -9.72269394], par_old= [-0.02776432 3. -9.4971695 ], dl = 0.012065820415500639) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03871092 3. -9.84690086], par_old= [-0.03507539 3. -9.72269394], dl = 0.19971256926373826) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03961821 3. -9.90900432], par_old= [-0.03871092 3. -9.84690086], dl = 0.2921518314178684) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [-0.03850395 3. -9.97110778], par_old= [-0.03961821 3. -9.90900432], dl = 0.11723315790277411) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.03952671 3. -10.03321125], par_old= [-0.03850395 3. -9.97110778], dl = 0.09931386922653473) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.04002465 3. -10.09531471], par_old= [ -0.03952671 3. -10.03321125], dl = 0.3158297179966212) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.04162632 3. -10.34372856], par_old= [ -0.04002465 3. -10.09531471], dl = 0.07845070926032349) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.04738067 3. -10.59214241], par_old= [ -0.04162632 3. -10.34372856], dl = 0.3889256745833336) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.05093422 3. -10.65424587], par_old= [ -0.04738067 3. -10.59214241], dl = 0.11179465757686557) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.0553364 3. -10.71634933], par_old= [ -0.05093422 3. -10.65424587], dl = 0.24760168362445256) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.05397736 3. -10.90265972], par_old= [ -0.0553364 3. -10.71634933], dl = 0.05899195544861868) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:338: UserWarning: The fitted parameters does not provide the optimum fit. Something wrong with fit (par = [ -0.05399845 3. -10.96476318], par_old= [ -0.05397736 3. -10.90265972], dl = 0.4678687077039285) '(par = {}, par_old= {}, dl = {})'.format(str(par), par_old, delta)) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller')
Exceedances of significant wave-height data over level 7,
gpd7 = ws.genpareto.fit2(Hs[Hs>7], floc=7)
fig, axes = plt.subplots()
gpd7.plotesf(plot_ci=True)
c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-32.03358494], p_min=[-8.91576073e+11], p=-5.948344823567952) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-36.04365339], p_min=[-9.95845524e+11], p=-6.907755278982137) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller')
Simulates 100 values from the GEV distribution with parameters (0.3, 1, 2), then estimates the parameters using two different methods and plots the estimated distribution functions together with the empirical distribution.
Rgev = ws.genextreme.rvs(0.3,1,2,size=100)
gp = ws.genextreme.fit2(Rgev,method='mps')
gm = ws.genextreme.fit2(Rgev,method='ml')
fig, axes = plt.subplots()
gp.plotesf(plot_ci=True)
gm.plotesf('r--', plot_ci=True)
c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-28.98554649], p_min=[-7.87396156e+11], p=-5.948344823567952) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-36.04365339], p_min=[-9.95845524e+11], p=-6.907755278982137) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller') c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:49: UserWarning: Exceeded max iterations. (p_min0=[-36.04365339], p_min=[-9.95845524e+11], p=-6.907755278982137) warnings.warn(msg) c:\users\peran\documents\workspace\pywafo\src\wafo\stats\estimation.py:517: UserWarning: Lower bound is smaller warnings.warn('Lower bound is smaller')
Similarly for the GPD distribution
Rgpd = ws.genpareto.rvs(0.4,size=100);
gmps = ws.genpareto.fit2(Rgpd, method='mps')
gml = ws.genpareto.fit2(Rgpd, method='ml')
fig, axes = plt.subplots()
gmps.plotesf(plot_ci=True)
gml.plotesf('r--', plot_ci=True)
Return values for the GEV distribution
T = np.logspace(1, 5, 10)
prb = ws.returnperiod2sf(T)
sT = Y5gev.isf(prb)
ci = []
t = []
for Ti, sTi in zip(T, sT):
try:
Lx = Y5gev.profile_quantile(sTi, i=2)
ci.append(Lx.get_bounds(alpha=0.05))
t.append(Ti)
except Exception:
pass
fig, axes = plt.subplots()
plt.semilogx(T,sT, t, ci,'r')
N = np.r_[1:len(Y5M)+1]
Nmax = max(N)
plt.plot(Nmax/N, sorted(Y5M, reverse=True), '.')
plt.title('Return values in the GEV model')
plt.xlabel('Return period')
plt.ylabel('Return value')
plt.grid(True)
import wafo.stats as ws
R = ws.genpareto.rvs(-0.5,size=100)
phat = ws.genpareto.fit2(R[R>.5], -.5, scale=1., floc=0.5, method='mps')
print(phat)
phat.plotfitsummary()
FitDistribution: alpha = 0.05 method = mps LLmax = -12.832818392343725 LPSmax = -258.54510003827306 pvalue = 0.9417261831146203 par = [-0.45779939 0.5 0.7418232 ] par_lower = [-0.71893284 0.5 0.49744076] par_upper = [-0.19666593 0.5 0.98620564] par_fix = [nan, 0.5, nan] par_cov = [[ 0.01775125 0. -0.0150594 ] [ 0. 0. 0. ] [-0.0150594 0. 0.0155469 ]]
# Better CI for phat.par[i=0] shape parameter
Lp0 = phat.profile(i=0, ) # pmin=-1.,pmax=1)
fig, axes = plt.subplots()
Lp0.plot()
phat0_ci = Lp0.get_bounds(alpha=0.1)
print('phat0_ci = {}'.format(phat0_ci))
phat0_ci = [-0.66890795 -0.20492182]
# Better CI for phat.par[i=2] scale
Lp2 = phat.profile(i=2,) # pmin=0.1,pmax=2)
fig, axes = plt.subplots()
Lp2.plot()
phat2_ci = Lp2.get_bounds(alpha=0.1)
print('phat2_ci = {}'.format(phat2_ci))
phat2_ci = [0.5565305 0.97386305]
SF = 1./990
x = phat.isf(SF)
print(x)
print(phat)
# CI for x
Lx = phat.profile_quantile(x, i=2,) # pmin=0.8, pmax=6.7)
fig, axes = plt.subplots()
Lx.plot()
x_ci = Lx.get_bounds(alpha=0.2)
print('X_ci = {}'.format(x_ci))
2.0515101296285656 FitDistribution: alpha = 0.05 method = mps LLmax = -12.832818392343725 LPSmax = -258.54510003827306 pvalue = 0.9417261831146203 par = [-0.45779939 0.5 0.7418232 ] par_lower = [-0.71893284 0.5 0.49744076] par_upper = [-0.19666593 0.5 0.98620564] par_fix = [nan, 0.5, nan] par_cov = [[ 0.01775125 0. -0.0150594 ] [ 0. 0. 0. ] [-0.0150594 0. 0.0155469 ]]
X_ci = [1.90461167 2.48652413]