summary refs log tree commit diff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2022-11-24 11:24:40 +0000
committerChristopher Baines <mail@cbaines.net>2022-11-25 10:51:52 +0000
commita3d85918f90e31118bc9b7e483520d0ae6192e3d (patch)
tree130c82ef3c414aae5de770c9845fb59267d74c20
parent0575012803683ebacd43029530683af7bdf791f9 (diff)
downloadguix-a3d85918f90e31118bc9b7e483520d0ae6192e3d.tar.gz
gnu: Add python-reproject.
* gnu/packages/astronomy.scm (python-reproject): New variable.

Signed-off-by: Christopher Baines <mail@cbaines.net>
-rw-r--r--gnu/packages/astronomy.scm56
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 492b871e12..b5f37232a3 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1355,6 +1355,62 @@ Virtual observatory (VO) using Python.")
     (description "Regions is an Astropy package for region handling.")
     (license license:bsd-3)))
 
+(define-public python-reproject
+  (package
+    (name "python-reproject")
+    (version "0.9.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "reproject" version))
+       (sha256
+        (base32 "1msysqbhkfi3bmw29wipk250a008bnng7din56md9ipbwiar8x55"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; FIXME: Failing tests
+      ;;
+      ;; reproject/adaptive/core.py:7: in <module>
+      ;; from .deforest import map_coordinates
+      ;; E   ModuleNotFoundError: No module named 'reproject.adaptive.deforest'
+      ;;
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'writable-compiler
+            (lambda _
+              (make-file-writable "reproject/_compiler.c")))
+          (add-before 'check 'writable-compiler
+            (lambda _
+              (make-file-writable "reproject/_compiler.c")))
+          (add-before 'check 'writable-home
+            (lambda _
+              (setenv "HOME" (getcwd)))))))
+    (propagated-inputs
+     (list python-astropy
+           python-astropy-healpix
+           python-numpy
+           python-scipy))
+    (native-inputs
+     (list python-asdf
+           python-cython
+           python-extension-helpers
+           python-gwcs
+           python-pytest-astropy
+           python-pyvo
+           python-semantic-version
+           python-pytest
+           python-setuptools-scm
+           python-shapely))
+    (home-page "https://reproject.readthedocs.io")
+    (synopsis "Astronomical image reprojection in Python")
+    (description
+     "This package provides a functionality to reproject astronomical images using
+various techniques via a uniform interface, where reprojection is the
+re-gridding of images from one world coordinate system to another e.g.
+changing the pixel resolution, orientation, coordinate system.")
+    (license license:bsd-3)))
+
 (define-public python-astral
   (package
     (name "python-astral")