forked from pool/python-astropy
Benjamin Greiner
26a13db1b8
- Add astropy-pr15479-pvstar.patch * PR gh#astropy/astropy#15479 backports gh#astropy/astropy#15476 * Issue at gh#astropy/astropy#15537 OBS-URL: https://build.opensuse.org/request/show/1124145 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=106
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)
|