[python-astropy] 02/02: Use wcslib >= 4.20

Ole Streicher olebole-guest at moszumanska.debian.org
Fri Dec 20 13:10:34 UTC 2013


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository python-astropy.

commit 1d7d08bab7ebc1d2adf1d833f1db67f0eddd64fd
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Dec 20 14:10:17 2013 +0100

    Use wcslib >= 4.20
---
 debian/control                |  2 +-
 debian/patches/CUNITfix.patch | 63 +++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 3 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 513c19f..c9df62b 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@ Build-Depends: cython,
                python3-nose,
                python3-numpy (>= 1:1.6.2),
                python3-setuptools (>= 0.6.4),
-               wcslib-dev,
+               wcslib-dev (>= 4.20),
                zlib1g-dev
 Standards-Version: 3.9.4
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/python-astropy.git
diff --git a/debian/patches/CUNITfix.patch b/debian/patches/CUNITfix.patch
new file mode 100644
index 0000000..e1bc8b9
--- /dev/null
+++ b/debian/patches/CUNITfix.patch
@@ -0,0 +1,63 @@
+From 86afcd019cb1c3f49b03bd1ce4c06d1b91bd4d3e Mon Sep 17 00:00:00 2001
+From: Michael Droettboom <mdboom at gmail.com>
+Date: Mon, 2 Dec 2013 13:45:33 -0500
+Subject: [PATCH] Fix reporting of which CUNITn element was changed by unitfix
+
+---
+ CHANGES.rst                            |  5 +++++
+ astropy/wcs/tests/data/validate.txt    |  2 +-
+ cextern/patches/cunit-fix-message.diff | 11 +++++++++++
+ cextern/trim_wcslib.sh                 |  2 ++
+ cextern/wcslib/C/wcs.c                 |  2 +-
+ 5 files changed, 20 insertions(+), 2 deletions(-)
+ create mode 100644 cextern/patches/cunit-fix-message.diff
+
+--- a/CHANGES.rst
++++ b/CHANGES.rst
+@@ -653,6 +653,11 @@
+   - Fixed a crash that could sometimes occur when running the test suite on
+     systems with platform names containing non-ASCII characters. [#1698]
+ 
++  - When a unit is "fixed" by `astropy.wcs.WCS.fix` or
++    `astropy.wcs.Wcsprm.unitfix`, it now correctly reports the
++    ``CUNIT`` field that was changed.  (This requires that astropy
++    was built with the locally distributed version of wcslib). [#1854]
++
+ Other Changes and Additions
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 
+--- a/astropy/wcs/tests/data/validate.txt
++++ b/astropy/wcs/tests/data/validate.txt
+@@ -11,6 +11,6 @@
+   WCS key ' ':
+     - The WCS transformation has more axes (3) than the image it is
+       associated with (0)
+-    - 'celfix' made the change 'In CUNIT2 : Mismatched units type
++    - 'celfix' made the change 'In CUNIT3 : Mismatched units type
+       'length': have 'Hz', want 'm''.
+     - 'unitfix' made the change 'Changed units: 'HZ      ' -> 'Hz''.
+--- /dev/null
++++ b/cextern/patches/cunit-fix-message.diff
+@@ -0,0 +1,11 @@
++--- a/wcslib/C/wcs.c
+++++ b/wcslib/C/wcs.c
++@@ -2037,7 +2037,7 @@ int wcs_units(struct wcsprm *wcs)
++       if (wcsunitse(wcs->cunit[i], units, &scale, &offset, &power,
++                     &uniterr)) {
++         wcserr_set(WCSERR_SET(WCSERR_BAD_COORD_TRANS),
++-          "In CUNIT%d%.1s: %s", i, (*wcs->alt)?wcs->alt:"", uniterr->msg);
+++          "In CUNIT%d%.1s: %s", i+1, (*wcs->alt)?wcs->alt:"", uniterr->msg);
++         free(uniterr);
++         return WCSERR_BAD_COORD_TRANS;
++       }
+--- a/cextern/wcslib/C/wcs.c
++++ b/cextern/wcslib/C/wcs.c
+@@ -2037,7 +2037,7 @@
+       if (wcsunitse(wcs->cunit[i], units, &scale, &offset, &power,
+                     &uniterr)) {
+         wcserr_set(WCSERR_SET(WCSERR_BAD_COORD_TRANS),
+-          "In CUNIT%d%.1s: %s", i, (*wcs->alt)?wcs->alt:"", uniterr->msg);
++          "In CUNIT%d%.1s: %s", i+1, (*wcs->alt)?wcs->alt:"", uniterr->msg);
+         free(uniterr);
+         return WCSERR_BAD_COORD_TRANS;
+       }
diff --git a/debian/patches/series b/debian/patches/series
index fd89cb2..8d08120 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 mark_known_failures.patch
 parallel_fk4_no_fk4.pytch
+CUNITfix.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-astropy.git



More information about the debian-science-commits mailing list