1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- from scattnlay import fieldnlay, scattnlay, expansioncoeffs, scattcoeffs
- import numpy as np
- import cmath
- WL=550
- core_r = 102
- index_NP = 4.0
- x = np.ones((1), dtype = np.float64)
- m = np.ones((1), dtype = np.complex128)
- import matplotlib.pyplot as plt
- npts = 151
- ext = ".png"
- x[0] = 2.0*np.pi*core_r/WL
- m[0] = index_NP
- comment='bulk-NP-R'+str(core_r)+'nm-WL'+str(WL)
- x = np.array([x])
- m = np.array([m])
- terms, Qext, Qsca, Qabs, Qbk, Qpr, g, Albedo, S1, S2 = scattnlay(x, m)
- nmax = terms
- terms, an, bn = scattcoeffs(x, m, nmax)
- terms, aln, bln, cln, dln = expansioncoeffs(x, m, nmax)
- print(terms, dln)
|