Fix finite <-> infinite error

This commit is contained in:
Marek Nečada 2020-07-04 01:50:00 +03:00
parent 38fca209ef
commit 07c2f678b2
2 changed files with 7 additions and 7 deletions

View File

@ -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']] 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 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), np.savez(outfile, meta=vars(a), **results)
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)
logging.info("Saved to %s" % outfile) logging.info("Saved to %s" % outfile)
exit(0) exit(0)

View File

@ -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['omega'] If contour points are not needed...
#del res['ImTW'] # not if dbg=false anyway #del res['ImTW'] # not if dbg=false anyway
outfile = defaultprefix + ".npz" if a.output is None else a.output 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) logging.info("Saved to %s" % outfile)