Revision | 7f725d5e210b09ea77030af9488c489dcba1c5e2 (tree) |
---|---|
Time | 2014-11-03 19:54:35 |
Author | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
Minor modifications: I just changed the name of a module I need to import.
@@ -1,6 +1,6 @@ | ||
1 | 1 | #! /usr/bin/env python |
2 | 2 | |
3 | -#from enthought.mayavi import mlab | |
3 | +from mayavi import mlab | |
4 | 4 | import scipy.linalg as sl |
5 | 5 | |
6 | 6 | import scipy as s |
@@ -747,7 +747,7 @@ | ||
747 | 747 | ######################################################################## |
748 | 748 | |
749 | 749 | |
750 | -kf=1.6 | |
750 | +kf=1.3 | |
751 | 751 | df= 1.78 # 1.8 |
752 | 752 | epsi=0.01 |
753 | 753 | n_steps=8000 #with the first algorithm, it is the number of failed attempts |
@@ -756,14 +756,14 @@ | ||
756 | 756 | #With the second algoritm, 2pi/n_steps is the angle of every to rotation. |
757 | 757 | |
758 | 758 | |
759 | -algo=2 # use the algorithm which is indicated for low df | |
759 | +algo=1 # use the algorithm which is indicated for low df | |
760 | 760 | #=2 use the algortihm for high fractal dimension |
761 | 761 | |
762 | 762 | # clust_to_combine=32 |
763 | 763 | |
764 | 764 | start=0 |
765 | 765 | |
766 | -end=128 | |
766 | +end=64 | |
767 | 767 | |
768 | 768 | clust_list=[] |
769 | 769 |
@@ -851,12 +851,12 @@ | ||
851 | 851 | z=final_cluster[:,2] |
852 | 852 | |
853 | 853 | |
854 | -#mlab.clf() | |
855 | -#pts = mlab.points3d(x, y, z, scale_mode='none', resolution=20,\ | |
856 | -# color=(0,0,1),scale_factor=2.) | |
854 | +mlab.clf() | |
855 | +pts = mlab.points3d(x, y, z, scale_mode='none', resolution=20,\ | |
856 | + color=(0,0,1),scale_factor=2.) | |
857 | 857 | #mlab.axes(pts) |
858 | 858 | |
859 | -#mlab.show() | |
859 | +mlab.show() | |
860 | 860 | |
861 | 861 | |
862 | 862 | R1_agg_sq=s.var(final_cluster[:,0])+s.var(final_cluster[:,1])+\ |
@@ -1,6 +1,9 @@ | ||
1 | 1 | #! /usr/bin/env python |
2 | 2 | |
3 | -#from enthought.mayavi import mlab | |
3 | +# from enthought.mayavi import mlab | |
4 | + | |
5 | +from mayavi import mlab | |
6 | + | |
4 | 7 | |
5 | 8 | import scipy as s |
6 | 9 | import numpy as n |
@@ -223,14 +226,14 @@ | ||
223 | 226 | |
224 | 227 | # N=3. |
225 | 228 | # a=1. and removed from the formula |
226 | -kf=1.6 | |
229 | +kf=1.3 | |
227 | 230 | df= 1.78 # 1.8 |
228 | 231 | |
229 | 232 | epsi=0.01 |
230 | 233 | |
231 | 234 | # N_iter=80 |
232 | 235 | |
233 | -N_clust=128 | |
236 | +N_clust=64 | |
234 | 237 | |
235 | 238 | |
236 | 239 | # d_square= new_dist_sq(N,df,kf) |