forked from pool/python-astropy
82ad95d973
:test flavor is currently failing but undetected! - actually detect unit test failures with sys.exit(astropy.tests()) - do not fail on DeprecationWarnings - support updated system lib wcslib 7.3 with astropy-pr10433-wcslib73-tests.patch gh#astropy/astropy#10433 astropy-pr10440-wcs-datfix.patch gh#astropy/astropy#10440 - clean up blank lines after pytest report and prevent possible failure of tests depending on test order astropy-pr10545-remove-newline-3d_cd_hdr.patch gh#astropy/astropy#10545 OBS-URL: https://build.opensuse.org/request/show/821523 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=32
25 lines
1000 B
Diff
25 lines
1000 B
Diff
From 4ddb4e94c67a4d8712fc656bcd9882b8f7e2b2f4 Mon Sep 17 00:00:00 2001
|
|
From: Mihai Cara <mihail.cara@gmail.com>
|
|
Date: Wed, 3 Jun 2020 16:31:22 -0400
|
|
Subject: [PATCH] Do not issue datfix warning when MJDREF has default value
|
|
|
|
---
|
|
CHANGES.rst | 2 ++ (removed for rebase)
|
|
astropy/wcs/wcs.py | 3 +++
|
|
2 files changed, 5 insertions(+)
|
|
|
|
diff --git a/astropy/wcs/wcs.py b/astropy/wcs/wcs.py
|
|
index 7f5f79bbc95..aa3a4d77951 100644
|
|
--- a/astropy/wcs/wcs.py
|
|
+++ b/astropy/wcs/wcs.py
|
|
@@ -681,6 +681,9 @@ def fix(self, translate_units='', naxis=None):
|
|
fixes = self.wcs.fix(translate_units, naxis)
|
|
for key, val in fixes.items():
|
|
if val != "No change":
|
|
+ if (key == 'datfix' and '1858-11-17' in val and
|
|
+ not np.count_nonzero(self.wcs.mjdref)):
|
|
+ continue
|
|
warnings.warn(
|
|
("'{0}' made the change '{1}'.").
|
|
format(key, val),
|