diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-05 22:01:05 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-27 17:03:09 +0100 |
commit | 80ac82d6abf6f1f73d3675c66d96185c2f02f55b (patch) | |
tree | a89465b0b984688a9fefd06cb8c91d0d694a6245 /gnu | |
parent | 591e2584082f996bd83e7bd03946138bdbb709b9 (diff) | |
download | guix-80ac82d6abf6f1f73d3675c66d96185c2f02f55b.tar guix-80ac82d6abf6f1f73d3675c66d96185c2f02f55b.tar.gz |
gnu: Add python-pvextractor.
* gnu/packages/astronomy.scm (python-pvextractor): New variable.
Change-Id: I43589099c662cd73ac234a8581be6a559d2ddd6c
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/astronomy.scm | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 263ea1c46e..e3563a6ffd 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -1237,6 +1237,54 @@ astronomy-specific functionality") across many files.") (license license:bsd-3))) +(define-public python-pvextractor + (package + (name "python-pvextractor") + (version "0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pvextractor" version)) + (sha256 + (base32 "1kl33vg5rxmdwlk36pn8zqa7k7f43fb7w417fym6ygp86mci2spd")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "--pyargs" "pvextractor") + #:phases + #~(modify-phases %standard-phases + ;; See <https://github.com/radio-astro-tools/pvextractor/issues/124>. + (add-after 'unpack 'patch-regexp + (lambda _ + (substitute* "pvextractor/pvregions.py" + (("coordre = re.compile.*") + "coordre = re.compile(\"^[a-z]*\\\\((.*)\\\\)\")\n")))) + (add-before 'check 'prepare-x + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0") + (setenv "HOME" "/tmp")))))) + (propagated-inputs + (list python-astropy + python-matplotlib + python-numpy + python-pyqt-6 + python-qtpy + python-scipy + python-spectral-cube)) + (native-inputs + (list python-pytest-astropy + python-setuptools-scm + xorg-server-for-tests)) + (home-page "http://pvextractor.readthedocs.io") + (synopsis "Position-Velocity diagram extractor") + (description + "The concept of the pvextractor package is simple - given a path defined +in sky coordinates, and a spectral cube, extract a slice of the cube along +that path, and along the spectral axis, producing a position-velocity or +position-frequency slice.") + (license license:bsd-3))) + (define-public python-pyxsim (package (name "python-pyxsim") |