guix_mirror_bot pushed a commit to branch astro-update
in repository guix.
commit 25828416589136115d9cbd91ffa851bea88331d2
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Fri Jan 16 13:54:04 2026 +0000
gnu: Add python-gammapy.
* gnu/packages/astronomy.scm (python-gammapy): New variable.
Change-Id: I9454ee32cf00bf3aa996efd71be2b32fa954ce16
---
gnu/packages/astronomy.scm | 72 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index c3bf732fa4..802682b90e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -5164,6 +5164,78 @@ CFITSIO library. Among other things, it can
galaxies) in a variety of ways.")
(license license:bsd-3)))
+(define-public python-gammapy
+ (package
+ (name "python-gammapy")
+ (version "2.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "gammapy" version))
+ (sha256
+ (base32 "0b3gy005zjp1cj5l6ba130r650a1c05krma6vxp902pqvpbyiz8f"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; tests: 1830 passed, 800 skipped, 9 xfailed, 1 xpassed, 479 warnings
+ #:test-flags
+ #~(list "--pyargs" "gammapy"
+ "--numprocesses" (number->string (parallel-job-count))
+ ;; AttributeError: 'TableLoc' object has no attribute
'with_index'
+ "--deselect=data/tests/test_obs_table.py::test_basics")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "pyproject.toml"
+ ;; "matplotlib>=3.8,<3.10",
+ ((">=3.8,<3.10") ">=3.8"))))
+ (add-before 'check 'remove-local-source
+ (lambda _
+ (delete-file-recursively "gammapy")))
+ (add-before 'check 'set-home
+ (lambda _
+ (setenv "HOME" "/tmp"))))))
+ (native-inputs
+ (list python-cython
+ python-pytest
+ python-pytest-astropy
+ python-pytest-xdist
+ python-setuptools
+ python-setuptools-scm))
+ (propagated-inputs
+ (list python-astropy
+ python-click
+ python-iminuit
+ python-matplotlib
+ python-numpy
+ python-pydantic
+ python-pyyaml
+ python-regions
+ python-scipy
+ ;; [optional]
+ python-healpy
+ python-ipywidgets
+ python-naima
+ python-numba
+ ;;python-ray ;not packaged yet in Guix
+ python-requests
+ ;;python-sherpa ;not packaged yet in Guix
+ python-tqdm
+ #;python-ultranest)) ;not packaged yet in Guix
+ (home-page "https://gammapy.org")
+ (synopsis "Gamma-ray astronomy in Python")
+ (description
+ "Gammapy is an Python package for gamma-ray astronomy built on Numpy,
Scipy and
+Astropy. It is used as core library for the Science Analysis tools of the
+Cherenkov Telescope Array (CTA), recommended by the H.E.S.S. collaboration to
+be used for Science publications, and is already widely used in the analysis
+of existing gamma-ray instruments, such as @acronym{MAGIC, Major Atmospheric
+Gamma Imaging Cherenkov Telescopes} @acronym{VERITAS, Very Energetic Radiation
+Imaging Telescope Array System} and @acronym{HAWC, The High-Altitude Water
+Cherenkov Gamma-Ray Observatory}.")
+ (license license:bsd-3)))
+
(define-public python-gatspy
(package
(name "python-gatspy")