|
|
@ -3475,8 +3475,8 @@ def kreg_demo2(n=100, hs=None, symmetric=False, fun='hisj', plotlog=False):
|
|
|
|
import scipy.stats as st
|
|
|
|
import scipy.stats as st
|
|
|
|
from sg_filter import SavitzkyGolay
|
|
|
|
from sg_filter import SavitzkyGolay
|
|
|
|
dist = st.norm
|
|
|
|
dist = st.norm
|
|
|
|
scale1 = 0.3
|
|
|
|
scale1 = 0.5
|
|
|
|
loc1= 1
|
|
|
|
loc1= 1.5
|
|
|
|
norm1 = dist.pdf(-loc1, loc=-loc1, scale=scale1) + dist.pdf(-loc1, loc=loc1, scale=scale1)
|
|
|
|
norm1 = dist.pdf(-loc1, loc=-loc1, scale=scale1) + dist.pdf(-loc1, loc=loc1, scale=scale1)
|
|
|
|
fun1 = lambda x : (dist.pdf(x, loc=-loc1, scale=scale1) + dist.pdf(x, loc=loc1, scale=scale1))/norm1
|
|
|
|
fun1 = lambda x : (dist.pdf(x, loc=-loc1, scale=scale1) + dist.pdf(x, loc=loc1, scale=scale1))/norm1
|
|
|
|
|
|
|
|
|
|
|
@ -3699,6 +3699,8 @@ def test_docstrings():
|
|
|
|
doctest.testmod()
|
|
|
|
doctest.testmod()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
|
|
|
import wafo.fig as fig
|
|
|
|
|
|
|
|
|
|
|
|
plt.ioff()
|
|
|
|
plt.ioff()
|
|
|
|
#test_docstrings()
|
|
|
|
#test_docstrings()
|
|
|
|
#kde_demo2()
|
|
|
|
#kde_demo2()
|
|
|
@ -3708,6 +3710,8 @@ if __name__ == '__main__':
|
|
|
|
for i, n in enumerate([10,100,1000,2000,4000]):
|
|
|
|
for i, n in enumerate([10,100,1000,2000,4000]):
|
|
|
|
plt.figure(i)
|
|
|
|
plt.figure(i)
|
|
|
|
kreg_demo2(n=n,symmetric=True,fun='hste', plotlog=False)
|
|
|
|
kreg_demo2(n=n,symmetric=True,fun='hste', plotlog=False)
|
|
|
|
|
|
|
|
fig.tile(range(5))
|
|
|
|
plt.show()
|
|
|
|
plt.show()
|
|
|
|
|
|
|
|
|
|
|
|
#test_smoothn_2d()
|
|
|
|
#test_smoothn_2d()
|
|
|
|
#test_smoothn_cardioid()
|
|
|
|
#test_smoothn_cardioid()
|