Fix/update finiterectlat-modes.py

This commit is contained in:
Marek Nečada 2020-08-03 14:35:37 +03:00
parent ae62cf903d
commit 5285210489
1 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import math
from qpms.argproc import ArgParser
ap = ArgParser(['rectlattice2d_finite', 'single_particle', 'single_lMax', ])
ap = ArgParser(['rectlattice2d_finite', 'background_analytical', 'single_particle', 'single_lMax', ])
ap.add_argument("-t", "--rank-tolerance", type=float, default=1e11)
ap.add_argument("-c", "--min-candidates", type=int, default=1, help='always try at least this many eigenvalue candidates, even if their SVs in the rank tests are lower than rank_tolerance')
@ -32,8 +32,8 @@ px, py = a.period
particlestr = ("sph" if a.height is None else "cyl") + ("_r%gnm" % (a.radius*1e9))
if a.height is not None: particlestr += "_h%gnm" % (a.height * 1e9)
defaultprefix = "%s_p%gnmx%gnm_%dx%d_m%s_n%g_L%d_c(%s±%g±%gj)eV_cn%d" % (
particlestr, px*1e9, py*1e9, Nx, Ny, str(a.material), a.refractive_index, a.lMax,
defaultprefix = "%s_p%gnmx%gnm_%dx%d_m%s_B%s_L%d_c(%s±%g±%gj)eV_cn%d" % (
particlestr, px*1e9, py*1e9, Nx, Ny, str(a.material), str(a.background), a.lMax,
str(a.centre), a.ai, a.ar, a.N)
logging.info("Default file prefix: %s" % defaultprefix)
@ -71,7 +71,7 @@ particles= [Particle(orig_xy[i], ap.tmgen, bspec) for i in np.ndindex(orig_xy.sh
sym = FinitePointGroup(point_group_info['D2h'])
logging.info("Creating scattering system object")
ss, ssw = ScatteringSystem.create(particles, medium, sym, a.centre * eh)
ss, ssw = ScatteringSystem.create(particles, medium, a.centre * eh, sym=sym)
if a.irrep == 'none':
iri = None # no irrep decomposition