forked from JoeMcEwen/FAST-PT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kPol.py
40 lines (30 loc) · 1.02 KB
/
kPol.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import numpy as np
from J_table import J_table
import sys
# The ordering is \alpha, \beta, l_1, l_2, l, A coefficient.
l_mat1= np.array([[-2,-2,0,0,0,2.],\
[-2,-2,2,0,0,6.],\
[-2,-2,0,0,2,1.],\
[-2,-2,2,2,0,6.],\
[-2,-2,1,1,1,-9.]], dtype=float)
l_mat2 = np.array([[-2,-2,0,0,0,1.],\
[-2,-2,2,0,0,-2.],\
[-2,-2,1,1,1,9.],\
[-2,-2,2,2,0,-8.]], dtype=float)
l_mat3= np.array([[-2,-2,0,0,0,1.],\
[-2,-2,2,0,0,-2.],
[-2,-2,2,2,0,1.]], dtype=float)
def kPol():
table1=np.zeros(10,dtype=float)
for i in range(l_mat1.shape[0]):
x=J_table(l_mat1[i])
table1=np.row_stack((table1,x))
table2=np.zeros(10,dtype=float)
for i in range(l_mat2.shape[0]):
x=J_table(l_mat2[i])
table2=np.row_stack((table2,x))
table3=np.zeros(10,dtype=float)
for i in range(l_mat3.shape[0]):
x=J_table(l_mat3[i])
table3=np.row_stack((table3,x))
return table1[1:,:], table2[1:,:], table3[1:,:]