def test_raw_fields_similar_to_mie(self): theory_mie = Mie(False, False) theory_tmat = Tmatrix() pos = np.array([10, 0, 0])[:,None] s = Sphere(n=1.59, r=0.9, center=(2, 2, 80)) pol = pd.Series([1, 0]) fields_mie = theory_mie._raw_fields(pos, s, 2*np.pi/.660, 1.33, pol) fields_tmat = theory_tmat._raw_fields(pos, s, 2*np.pi/.660, 1.33, pol) self.assertTrue(np.allclose(fields_mie, fields_tmat))