From 07c2f678b2ec52e85f565ed9a99036805e287b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sat, 4 Jul 2020 01:50:00 +0300 Subject: [PATCH] Fix finite <-> infinite error --- misc/finiterectlat-modes.py | 7 +------ misc/rectlat_simple_modes.py | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/finiterectlat-modes.py b/misc/finiterectlat-modes.py index b12986e..87fd696 100755 --- a/misc/finiterectlat-modes.py +++ b/misc/finiterectlat-modes.py @@ -95,12 +95,7 @@ results['inside_contour'] = inside_ellipse((results['eigval'].real, results['eig results['refractive_index_internal'] = [medium(om).n for om in results['eigval']] outfile = defaultprefix + (('_ir%s_%s.npz' % (str(iri), irname)) if iri is not None else '.npz') if a.output is None else a.output -np.savez(outfile, meta=vars(a), - ss_positions=ss.positions, ss_fullvec_poffsets=ss.fullvec_poffsets, - ss_fullvec_psizes=ss.fullvec_psizes, - ss_bspecs_flat = np.concatenate(ss.bspecs), - ss_lattice_basis=ss.lattice_basis, ss_reciprocal_basis = ss.reciprocal_basis, - **results) +np.savez(outfile, meta=vars(a), **results) logging.info("Saved to %s" % outfile) exit(0) diff --git a/misc/rectlat_simple_modes.py b/misc/rectlat_simple_modes.py index 4029066..1f706fa 100755 --- a/misc/rectlat_simple_modes.py +++ b/misc/rectlat_simple_modes.py @@ -116,7 +116,12 @@ res['refractive_index_internal'] = [emg(om).n for om in res['eigval']] #del res['omega'] If contour points are not needed... #del res['ImTW'] # not if dbg=false anyway outfile = defaultprefix + ".npz" if a.output is None else a.output -np.savez(outfile, meta=vars(a), empty_freqs=np.array(empty_freqs), **res) +np.savez(outfile, meta=vars(a), empty_freqs=np.array(empty_freqs), + ss_positions=ss.positions, ss_fullvec_poffsets=ss.fullvec_poffsets, + ss_fullvec_psizes=ss.fullvec_psizes, + ss_bspecs_flat = np.concatenate(ss.bspecs), + ss_lattice_basis=ss.lattice_basis, ss_reciprocal_basis = ss.reciprocal_basis, + **res) logging.info("Saved to %s" % outfile)