diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-21 15:54:40 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-31 22:13:41 +0100 |
commit | c5ef61bf9b11f69d32809c0c57c4bd08490a4764 (patch) | |
tree | 699de6a7f808d7fc657bff3c57e098505d64220a | |
parent | 23b3edba9d9d559d6dca0e98a26b9cacbb59281b (diff) |
gnu: Add python-pyhalo.
* gnu/packages/astronomy.scm (python-pyhalo): New variable.
Change-Id: Ic7e1e9ee8750d2b29e5ee9f8375c44e42f8f77ff
-rw-r--r-- | gnu/packages/astronomy.scm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index da3caa9129..0d72142cb1 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -5272,6 +5272,61 @@ position-frequency slice.") (list python-setuptools python-wheel))))) +(define-public python-pyhalo + (package + (name "python-pyhalo") + (version "1.4.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyhalo" version)) + (sha256 + (base32 "06zdcr82fzzn6zkjralmv9qv7qjyjkni1p1rg60bvl8h013v3xp6")))) + (build-system pyproject-build-system) + (arguments + (list + ;; ValueError: The truth value of an array with more than one element is + ;; ambiguous. Use a.any() or a.all() + #:test-flags #~(list "-k" "not test_vmax") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-setupup.py + ;; XXX: ModuleNotFoundError: No module named 'pyHalo.cli'. + (lambda _ + (substitute* "setup.py" + ((".pyHalo=pyHalo.cli:main.*") "")))) + (add-before 'check 'pre-check + (lambda _ + ;; RuntimeError: cannot cache function 'rotate': no locator + ;; available for file '<...>/lenstronomy/Util/util.py'. + (setenv "NUMBA_CACHE_DIR" "/tmp") + ;; PermissionError: [Errno 13] Permission denied: + ;; '/homeless-shelter' + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-astropy + python-click + python-colossus + python-h5py + python-lenstronomy + python-mcfit + python-numpy + python-scipy)) + (home-page "https://github.com/dangilman/pyHalo") + (synopsis "Render populations of dark matter halos") + (description + "pyHalo renders full mass distributions for substructure lensing +simulations with gravitational lensing software package lenstronomy. The main +purpose of the code is to quickly render full populations of dark matter +subhalos and line of sight halos for gravitational lensing simulations. It +also transltes halo properties (mass, concentration, redshift, etc) into +angular units for lensing computations with lenstronomy.") + (license license:expat))) + (define-public python-pyregion (package (name "python-pyregion") |