diff --git a/examples/animate.py b/examples/animate.py index 9f6e8365..108e7a12 100644 --- a/examples/animate.py +++ b/examples/animate.py @@ -17,8 +17,7 @@ import numpy as np data = hyp.tools.load('weights') -w = [i for i in data] -aligned_w = hyp.tools.align(w) +aligned_w = hyp.tools.align(data) w1 = np.mean(aligned_w[:17],0) w2 = np.mean(aligned_w[18:],0) diff --git a/examples/plot_align.py b/examples/plot_align.py index f247c184..049fdb04 100644 --- a/examples/plot_align.py +++ b/examples/plot_align.py @@ -18,10 +18,9 @@ import numpy as np data = hyp.tools.load('weights') -w = [i for i in data] -aligned_w = hyp.tools.align(w) +aligned_data = hyp.tools.align(data) -w1 = np.mean(aligned_w[:17],0) -w2 = np.mean(aligned_w[18:],0) +group1 = np.mean(aligned_data[:17],0) +group2 = np.mean(aligned_data[18:],0) -hyp.plot([w1[:100,:],w2[:100,:]]) +hyp.plot([group1[:100,:],group2[:100,:]]) diff --git a/examples/save_image.py b/examples/save_image.py index 5f85d23a..9c0800b8 100644 --- a/examples/save_image.py +++ b/examples/save_image.py @@ -15,7 +15,6 @@ import scipy.io as sio import numpy as np -data = hyp.tools.load('weights') -w=[i for i in data[0:3]] +data = hyp.tools.load('weights_sample') -hyp.plot(w,'o', save_path='test-image.pdf') +hyp.plot(data, 'o', save_path='test-image.pdf') diff --git a/examples/save_movie.py b/examples/save_movie.py index 7e7801d5..7c226f9e 100644 --- a/examples/save_movie.py +++ b/examples/save_movie.py @@ -17,10 +17,9 @@ import numpy as np data = hyp.tools.load('weights') -w = [i for i in data] -aligned_w = hyp.tools.align(w) +aligned_data = hyp.tools.align(data) -w1 = np.mean(aligned_w[:17],0) -w2 = np.mean(aligned_w[18:],0) +group1 = np.mean(aligned_data[:17], 0) +group2 = np.mean(aligned_data[18:], 0) -hyp.plot([w1,w2], animate=True, zoom=2.5, save_path='animation.mp4') +hyp.plot([group1, group2], animate=True, zoom=2.5, save_path='animation.mp4')