def eps0(self): """ Relaxed ion macroscopic |DielectricTensor| in Cartesian coordinates (a.k.a. epsilon_zero) None if the file does not contain this information. """ try: return DielectricTensor(self.reader.read_value("emacro_cart_rlx").T.copy()) except Exception as exc: #print(exc, "Requires dieflag > 0", "Returning None", sep="\n") return None
def epsinf(self): """ Macroscopic electronic |DielectricTensor| in Cartesian coordinates (a.k.a. epsilon_infinity) None if the file does not contain this information. """ try: return DielectricTensor(self.reader.read_value("emacro_cart").T.copy()) except Exception as exc: #print(exc, "Returning None", sep="\n") return None
def test_base(self): """Base tests for DielectricTensor""" eps = DielectricTensor(np.diag([1, 2, 3])) repr(eps); str(eps) assert eps._repr_html_() assert len(eps.get_dataframe()) == 3 assert len(eps.get_voigt_dataframe().keys()) == 6 self.assertArrayAlmostEqual(eps.reflectivity(), [0., 0.029437251522859434, 0.071796769724490825])