From 528521048965179d8a039ebc2c98f18409df6914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 3 Aug 2020 14:35:37 +0300 Subject: [PATCH] Fix/update finiterectlat-modes.py --- misc/finiterectlat-modes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/finiterectlat-modes.py b/misc/finiterectlat-modes.py index 87fd696..7610d28 100755 --- a/misc/finiterectlat-modes.py +++ b/misc/finiterectlat-modes.py @@ -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