aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2016-06-04 13:49:34 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2016-06-04 13:49:34 +0200
commit77e5bd11c6c6fcee8a5e309ccfdfbb3c02a38f65 (patch)
treec683ac85035ad3ea9d222e69f20ae0a30808e0fa
parentc48d93453e9bcca6763dba94e95ce68f1376de16 (diff)
parent15f94a3ca56d0038906c068fbfecf61a2fd16c2d (diff)
Merge branch 'master' of github.com:sunsistemo/SciCoPyth
-rw-r--r--Set 3/eigenmodes.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/Set 3/eigenmodes.py b/Set 3/eigenmodes.py
index 80b4200..0877301 100644
--- a/Set 3/eigenmodes.py
+++ b/Set 3/eigenmodes.py
@@ -63,10 +63,10 @@ def sortEigenmodes(w,v):
def plotEigenmode(w,v,eig):
eigmod = v[eig].reshape((sqrt(len(v[eig])),sqrt(len(v[eig]))))
- plt.title("Eigenmode #%d \n Frequency: %f" %(eig, 1/w[eig].real))
+ plt.title("Eigenmode #%d \n Frequency: %f" %(eig + 1, -w[eig].real))
plt.imshow(eigmod.real, cmap="hot")
- plt.colorbar()
- plt.show()
+ # plt.colorbar()
+ # plt.show()
def init():
u_im.set_array(np.ma.array(u))
@@ -87,8 +87,13 @@ def start_animation():
if __name__=="__main__":
latSize = 100
- eigNum = 100
+ eigNum = 50
- w,v = solveSystem(latSize, True, latSize*2, "s")
+ w,v = solveSystem(latSize, False, latSize*2, "c")
w,v = sortEigenmodes(w,v)
- plotEigenmode(w,v,2)
+ nlist = [0,1,2,3,10,20]
+ plt.figure(1)
+ for i in range(len(nlist)):
+ plt.subplot(2,len(nlist)/2,i+1)
+ plotEigenmode(w,v, nlist[i])
+ plt.show()