From 80efed00fd5ce65bb6ba4ab466304fa2e4900551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Tue, 28 Apr 2020 12:45:04 +0300 Subject: [PATCH] Plot empty lattice modes in lat2d_realfreqsvd.py Former-commit-id: 119036b35061cf23846028069ca3d154af6cf80e --- misc/lat2d_realfreqsvd.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/lat2d_realfreqsvd.py b/misc/lat2d_realfreqsvd.py index 916c9d4..90551b7 100755 --- a/misc/lat2d_realfreqsvd.py +++ b/misc/lat2d_realfreqsvd.py @@ -38,7 +38,7 @@ import qpms import warnings from qpms.cybspec import BaseSpec from qpms.cytmatrices import CTMatrix, TMatrixGenerator -from qpms.qpms_c import Particle, pgsl_ignore_error +from qpms.qpms_c import Particle, pgsl_ignore_error, empty_lattice_modes_xy from qpms.cymaterials import EpsMu, EpsMuGenerator, LorentzDrudeModel, lorentz_drude from qpms.cycommon import DebugFlags, dbgmsg_enable from qpms import FinitePointGroup, ScatteringSystem, BesselType, eV, hbar @@ -109,6 +109,12 @@ if a.plot or (a.plot_out is not None): label= None if i else irrep_labels.get(ss1.irrep_names[iri], ss1.irrep_names[iri]), **cargs) ax.set_ylim([0,1.1]) + if hasattr(ap, "background_epsmu"): + xlim = ax.get_xlim() + omegas_empty = empty_lattice_modes_xy(ap.background_epsmu, ap.reciprocal_basis2pi, k, omegas[-1]) + for om in omegas_empty: + if om/eh > xlim[0] and om/eh < xlim[1]: + ax.axvline(om/eh, ls=':') ax.set_xlabel('$\hbar \omega / \mathrm{eV}$') ax.set_ylabel('Singular values') ax.legend()