forked from pool/python-astropy
27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
|
From c15ad2fcd21182787eb7db2195bfc70690efca2e Mon Sep 17 00:00:00 2001
|
||
|
From: "P. L. Lim" <2090236+pllim@users.noreply.github.com>
|
||
|
Date: Fri, 13 Oct 2023 14:40:52 -0400
|
||
|
Subject: [PATCH] Backport PR #15476: Account for SOFA/ERFA bugfix in pvstar
|
||
|
|
||
|
---
|
||
|
astropy/units/tests/test_structured_erfa_ufuncs.py | 6 +++++-
|
||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/astropy/units/tests/test_structured_erfa_ufuncs.py b/astropy/units/tests/test_structured_erfa_ufuncs.py
|
||
|
index 729f9539c7e..42589397a19 100644
|
||
|
--- a/astropy/units/tests/test_structured_erfa_ufuncs.py
|
||
|
+++ b/astropy/units/tests/test_structured_erfa_ufuncs.py
|
||
|
@@ -139,7 +139,11 @@ def test_pvstar(self):
|
||
|
assert px.unit == u.arcsec
|
||
|
assert_quantity_allclose(px, 1 * u.radian)
|
||
|
assert rv.unit == u.km / u.s
|
||
|
- assert_array_equal(rv.value, np.zeros(self.pv.shape))
|
||
|
+ # RV is non-zero because proper motion induces a small redshift
|
||
|
+ # due to second order Doppler shift.
|
||
|
+ assert_quantity_allclose(
|
||
|
+ rv, np.zeros(self.pv.shape) << (u.km / u.s), atol=1 * u.m / u.s
|
||
|
+ )
|
||
|
|
||
|
def test_starpv(self):
|
||
|
ra, dec, pmr, pmd, px, rv, stat = erfa_ufunc.pvstar(self.pv)
|