def test_coeE_coef_coeE(self): coeE = convert.mod_angles(convert.coeE_coef(coe_sltn)) coef = convert.coef_coeE(coeE) coeE2 = convert.mod_angles(convert.coeE_coef(coef)) diff = convert.mod_angles(np.abs(coeE - coeE2), angle_indices=[0]) indices_2pi = np.where(2 * np.pi - tol < diff) diff[indices_2pi] -= 2 * np.pi np.testing.assert_allclose(diff, 0., rtol=0, atol=tol)
def test_compare_meeEl_meefl_to_coeE_coef(self): coef = convert.mod_angles(coe_sltn) meefl = convert.mee_coe(coef) coeE = convert.coeE_coef(coef) meeEl = convert.meeEl_meefl(meefl) El1 = convert.mee_coe(coeE)[:, 5:] El2 = meeEl[:, 5:] diff = convert.mod_angles(El1 - El2, angle_indices=[0]) indices_2pi = np.where(2 * np.pi - tol < diff) diff[indices_2pi] -= 2 * np.pi np.testing.assert_allclose(diff, 0., rtol=0, atol=tol)