1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- from scattnlay import fieldnlay
- import numpy as np
- x = np.ones((1, 2), dtype = np.float64)
- x[0, 0] = 2.0*np.pi*0.05/1.064
- x[0, 1] = 2.0*np.pi*0.06/1.064
- m = np.ones((1, 2), dtype = np.complex128)
- m[0, 0] = 1.53413/1.3205
- m[0, 1] = (0.565838 + 7.23262j)/1.3205
- coord = np.zeros((3, 3), dtype = np.float64)
- coord[0, 0] = x[0, 0]/2.0
- coord[1, 0] = (x[0, 0] + x[0, 1])/2.0
- coord[2, 0] = 1.5*x[0, 1]
- terms, E, H = fieldnlay(x, m, coord)
- Er = np.absolute(E)
- Eh = np.sqrt(Er[0, :, 0]**2 + Er[0, :, 1]**2 + Er[0, :, 2]**2)
- print "x =", x
- print "m =", m
- print np.vstack((coord[:, 0], Eh)).transpose()
|