1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2019 by Amar Singh <nly@disroot.org>
6 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
7 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
8 ;;; Copyright © 2021, 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
9 ;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
10 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
11 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages astronomy)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (gnu packages algebra)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages bison)
34 #:use-module (gnu packages boost)
35 #:use-module (gnu packages check)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages curl)
38 #:use-module (gnu packages flex)
39 #:use-module (gnu packages fontutils)
40 #:use-module (gnu packages gcc)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages libusb)
48 #:use-module (gnu packages lua)
49 #:use-module (gnu packages maths)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages netpbm)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages pretty-print)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages python-build)
57 #:use-module (gnu packages python-check)
58 #:use-module (gnu packages python-crypto)
59 #:use-module (gnu packages python-science)
60 #:use-module (gnu packages python-web)
61 #:use-module (gnu packages python-xyz)
62 #:use-module (gnu packages qt)
63 #:use-module (gnu packages readline)
64 #:use-module (gnu packages time)
65 #:use-module (gnu packages version-control)
66 #:use-module (gnu packages video)
67 #:use-module (gnu packages wxwidgets)
68 #:use-module (gnu packages xiph)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system copy)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system python)
76 #:use-module (guix download)
77 #:use-module (guix gexp)
78 #:use-module (guix git-download)
79 #:use-module (guix packages)
80 #:use-module (guix utils)
81 #:use-module (ice-9 match)
82 #:use-module (srfi srfi-1))
84 (define-public aocommon
85 (let ((commit "7329a075271edab8f6264db649e81e62b2b6ae5e")
89 (version (git-version "0.0.0" revision commit))
94 (url "https://gitlab.com/aroffringa/aocommon")
97 (base32 "0qcfax6pbzs0yigy0x8xibrkk539wm2pbvjsb4lh50fybir02nix"))
98 (file-name (git-file-name name version))))
99 (build-system copy-build-system)
102 #~'(("include/aocommon" "include/aocommon"))))
103 (home-page "https://gitlab.com/aroffringa/aocommon")
104 (synopsis "Collection of functionality that is reused in astronomical applications")
106 "This package provides source-only AOCommon collection of functionality that is
107 reused in several astronomical applications, such as @code{wsclean},
108 @code{aoflagger}, @code{DP3} and @code{everybeam}.")
109 (license license:gpl3+))))
111 (define-public calceph
119 "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-"
122 (base32 "078wn773pwf4pg9m0h0l00g4aq744pq1rb6kz6plgdpzp3hhpk1k"))))
123 (build-system gnu-build-system)
126 (home-page "https://www.imcce.fr/inpop/calceph")
127 (properties `((release-monitoring-url . ,home-page)))
128 (synopsis "Astronomical library to access the binary planetary ephemeris files")
130 "The CALCEPH Library is designed to access the binary planetary ephemeris files,
131 such INPOPxx and JPL DExxx ephemeris files, (called @code{original JPL binary} or
132 @code{INPOP 2.0 or 3.0 binary} ephemeris files in the next sections) and the SPICE
133 kernel files (called @code{SPICE} ephemeris files in the next sections). At the
134 moment, supported SPICE files are:
137 @item text Planetary Constants Kernel (KPL/PCK) files;
138 @item binary PCK (DAF/PCK) files;
139 @item binary SPK (DAF/SPK) files containing segments of type 1, 2, 3, 5, 8, 9,
140 12, 13, 17, 18, 19, 20, 21, 102, 103 and 120;
141 @item meta kernel (KPL/MK) files;
142 @item frame kernel (KPL/FK) files (only basic support).
144 (license license:cecill)))
146 (define-public aoflagger
154 (url "https://gitlab.com/aroffringa/aoflagger")
155 (commit (string-append "v" version))))
157 (base32 "1dcbfrbiybhpbypna2xhddx1wk7yifh38ha2r6p5rzsikzwlsin1"))
159 (search-patches "aoflagger-use-system-provided-pybind11.patch"))
160 (file-name (git-file-name name version))))
161 (build-system cmake-build-system)
164 ;; XXX: Tests require external files download from
165 ;; https://www.astron.nl/citt/ci_data/aoflagger/
166 ;; FIXME: runtest is not found
169 #~(list (string-append "-DCASACORE_ROOT_DIR="
170 #$(this-package-input "casacore")))
172 #~(modify-phases %standard-phases
173 ;; aocommon and pybind11 are expected to be found as git submodules,
174 ;; link them before build.
175 (add-after 'unpack 'link-submodule-package
177 (rmdir "external/aocommon")
178 (symlink #$(this-package-native-input "aocommon")
179 (string-append (getcwd) "/external/aocommon")))))))
200 (home-page "https://gitlab.com/aroffringa/aoflagger")
201 (synopsis "Astronomical tool that can find and remove radio-frequency interference")
203 "AOFlagger is a tool that can find and remove radio-frequency
204 interference (RFI) in radio astronomical observations. It can make use of Lua
205 scripts to make flagging strategies flexible, and the tools are applicable to a
206 wide set of telescopes.")
207 (license license:gpl3+)))
209 (define-public casacore
217 (url "https://github.com/casacore/casacore")
218 (commit (string-append "v" version))))
221 "05ar5gykgh4dm826xplj5ri5rw7znhxrvin2l67a3mjwfys7r2a0"))
222 (file-name (git-file-name name version))))
223 (build-system cmake-build-system)
226 ;; Note: There are multiple failures in
227 ;; tests which require additional measures data. They are
228 ;; distributed via FTP without any license:
229 ;; ftp://ftp.astron.nl/outgoing/Measures/
230 ;; TODO: Check how to fix tests.
234 #~(list "-DBUILD_PYTHON3=ON"
236 "-DBUILD_TESTING=TRUE"
240 (string-append "-DDATA_DIR=" #$output "/data")
241 (string-append "-DPYTHON3_EXECUTABLE="
242 #$(this-package-input "python") "/bin")
243 (string-append "-DPYTHON3_INCLUDE_DIR="
244 #$(this-package-input "python") "/include")
245 (string-append "-DPYTHON3_LIBRARY="
246 #$(this-package-input "python") "/lib"))
248 #~(modify-phases %standard-phases
249 (add-after 'unpack 'set-env
251 (setenv "HOME" "/tmp")))
252 (add-after 'unpack 'use-absolute-rm
253 (lambda* (#:key inputs #:allow-other-keys)
254 (substitute* "casa/OS/test/tFile.run"
256 (search-input-file inputs "/bin/rm")))))
257 (add-after 'unpack 'use-absolute-python3
259 (substitute* "build-tools/casacore_floatcheck"
260 (("#!/usr/bin/env python")
261 (string-append "#!" (which "python3"))))))
262 ;; NOTE: (Sharlatan-20220611T200837+0100): Workaround for casacore
263 ;; tests stuck with missing "qsub" issue.
264 ;; https://github.com/casacore/casacore/issues/1122
265 (add-after 'unpack 'patch-pre-test-checks
267 (substitute* "build-tools/casacore_assay"
268 (("QSUBP=.*$") "QSUBP=\n")
269 (("YODP=.*$") "YODP=\n")))))))
287 (home-page "http://casacore.github.io/casacore/")
288 (synopsis "Suite of C++ libraries for radio astronomy data processing")
290 "The casacore package contains the core libraries of the old
291 AIPS++/CASA (Common Astronomy Software Application) package. This split was
292 made to get a better separation of core libraries and applications.
293 @url{https://casa.nrao.edu/, CASA} is now built on top of Casacore.")
294 (license license:gpl2+)))
296 (define-public cfitsio
304 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
305 "cfitsio-" version ".tar.gz"))
307 (base32 "1cyl1qksnkl3cq1fzl4dmjvkd6329b57y9iqyv44wjakbh6s4rav"))))
308 (build-system gnu-build-system)
309 ;; XXX Building with curl currently breaks wcslib. It doesn't use
310 ;; pkg-config and hence won't link with -lcurl.
312 `(#:tests? #f ; no tests
314 (modify-phases %standard-phases
315 (add-after 'unpack 'patch-paths
317 (substitute* "Makefile.in" (("/bin/") ""))
319 (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
320 (synopsis "Library for reading and writing FITS files")
321 (description "CFITSIO provides simple high-level routines for reading and
322 writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
323 programmer from the internal complexities of the FITS format. CFITSIO also
324 provides many advanced features for manipulating and filtering the information
326 (license (license:non-copyleft "file://License.txt"
327 "See License.txt in the distribution."))))
329 (define-public python-fitsio
331 (name "python-fitsio")
336 (uri (pypi-uri "fitsio" version))
338 (base32 "0q8siijys9kmjnqvyipjgh6hkhf4fwvr1swhsf4if211i9b0m1xy"))
339 (modules '((guix build utils)))
341 ;; Remove the bundled cfitsio
343 (delete-file-recursively "cfitsio3490")
344 (substitute* "MANIFEST.in"
345 (("recursive-include cfitsio3490.*$\n") ""))))))
346 (build-system python-build-system)
349 (modify-phases %standard-phases
350 (add-after 'unpack 'unbundle-cfitsio
351 (lambda* (#:key inputs #:allow-other-keys)
352 (let* ((cfitsio (assoc-ref inputs "cfitsio"))
353 (includedir (string-append "\"" cfitsio "/include\""))
354 (libdir (string-append "\"" cfitsio "/lib\"")))
355 ;; Use Guix' cfitsio instead of the bundled one
356 (substitute* "setup.py"
357 (("self.use_system_fitsio = False") "pass")
358 (("self.system_fitsio_includedir = None") "pass")
359 (("self.system_fitsio_libdir = None") "pass")
360 (("self.use_system_fitsio") "True")
361 (("self.system_fitsio_includedir") includedir)
362 (("self.system_fitsio_libdir") libdir)))))
363 (add-after 'unpack 'skip-bzip2-test
364 (lambda* (#:key inputs #:allow-other-keys)
365 ;; The bzip2 test fails because Guix' cfitsio
366 ;; is built without bzip2 support.
367 (substitute* "fitsio/test.py"
368 (("'SKIP_BZIP_TEST' in os.environ") "True")))))))
370 (list python-numpy cfitsio))
371 (home-page "https://github.com/esheldon/fitsio")
373 "Python library to read from and write to FITS files")
375 "This package provides a Python library for reading from and writing
376 to @acronym{FITS, Flexible Image Transport System} files using the
377 CFITSIO library. Among other things, it can
380 @item read and write image, binary, and ascii table extensions;
382 @item read arbitrary subsets of tables in a lazy manner;
384 @item query the rows and columns of a table;
386 @item read and write header keywords;
388 @item read and write Gzip files.
390 (license license:gpl2+)))
400 (string-append "ftp://ftp.eso.org/pub/qfits/qfits-" version ".tar.gz"))
402 (base32 "0m2b21mim3a7wgfg3ph2w5hv7mdvr03jmmhzipc0wcahijglcw9j"))))
403 (build-system gnu-build-system)
404 (home-page "https://www.eso.org/sci/software/eclipse/qfits/")
405 (synopsis "C library offering access to astronomical FITS files")
407 "@code{qfits} is a C library giving access to FITS file internals, both
408 for reading and writing.")
409 (license license:gpl2+)))
419 (url "https://github.com/liberfa/erfa")
420 (commit (string-append "v" version))))
421 (file-name (git-file-name name version))
423 (base32 "0s9dpj0jdkqcg552f00jhd722czji4pffabmpys5pgi6djckq4f4"))))
424 (build-system gnu-build-system)
426 (list automake autoconf libtool pkg-config))
427 (home-page "https://github.com/liberfa/erfa")
428 (synopsis "Essential Routines for Fundamental Astronomy")
430 "The @acronym{ERFA, Essential Routines for Fundamental Astronomy} C library
431 contains key algorithms for astronomy, and is based on the @acronym{SOFA,
432 Standards of Fundamental Astronomy} library published by the @acronym{IAU,
433 International Astronomical Union}.")
434 (license license:bsd-3)))
443 (uri (string-append "https://www.astromatic.net/download/eye/"
444 "eye-" version ".tar.gz"))
446 (base32 "092qhzcbrkcfidbx4bv9wz42w297n80jk7a6kwyi9a3fjfz81d7k"))))
447 (build-system gnu-build-system)
448 (home-page "https://www.astromatic.net/software/eye")
449 (synopsis "Small image feature detector using machine learning")
451 "In EyE (Enhance Your Extraction) an artificial neural network connected to
452 pixels of a moving window (retina) is trained to associate these input stimuli
453 to the corresponding response in one or several output image(s). The resulting
454 filter can be loaded in SExtractor to operate complex, wildly non-linear filters
455 on astronomical images. Typical applications of EyE include adaptive filtering,
456 feature detection and cosmetic corrections.")
457 (license license:cecill)))
459 (define-public wcslib
467 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
470 (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
473 (build-system gnu-build-system)
476 (list (string-append "--with-cfitsiolib="
477 (assoc-ref %build-inputs "cfitsio") "/lib")
478 (string-append "--with-cfitsioinc="
479 (assoc-ref %build-inputs "cfitsio") "/include"))
481 (modify-phases %standard-phases
482 (add-before 'configure 'patch-/bin/sh
484 (substitute* "makedefs.in"
487 (delete 'install-license-files)) ; installed by ‘make install’
488 ;; Parallel execution of the test suite is not supported.
489 #:parallel-tests? #f))
490 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
491 (synopsis "Library which implements the FITS WCS standard")
492 (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
493 defines keywords and usage that provide for the description of astronomical
494 coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
496 (license license:lgpl3+)))
498 (define-public weightwatcher
500 (name "weightwatcher")
505 (uri (string-append "https://www.astromatic.net/download/weightwatcher/"
506 "weightwatcher-" version ".tar.gz"))
508 (base32 "1zaqd8d9rpgcwjsp92q3lkfaa22i20gppb91dz34ym54swisjc2p"))))
509 (build-system gnu-build-system)
510 (home-page "https://www.astromatic.net/software/weightwatcher")
511 (synopsis "Weight-map/flag-map multiplexer and rasteriser")
513 "Weightwatcher is a program hat combines weight-maps, flag-maps and
514 polygon data in order to produce control maps which can directly be used in
515 astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
516 (license license:gpl3+)))
518 (define-public gnuastro
525 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
529 "1y9ig2kkwiwl0rmp9ip9n83fyjjpg2cc2pxzvdzr8rysq5az357y"))))
530 (build-system gnu-build-system)
532 '(#:configure-flags '("--disable-static")))
544 (home-page "https://www.gnu.org/software/gnuastro/")
545 (synopsis "Astronomy utilities")
546 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
547 programs for the manipulation and analysis of astronomical data.")
548 (license license:gpl3+)))
550 (define-public sextractor
558 (url "https://github.com/astromatic/sextractor")
560 (file-name (git-file-name name version))
562 (base32 "0q69n3nyal57h3ik2xirwzrxzljrwy9ivwraxzv9566vi3n4z5mw"))))
563 (build-system gnu-build-system)
564 ;; NOTE: (Sharlatan-20210124T103117+0000): Building with `atlas' is failing
565 ;; due to missing shared library which required on configure phase. Switch
566 ;; build to use `openblas' instead. It requires FFTW with single precision
573 "--with-openblas-libdir=" (assoc-ref %build-inputs "openblas") "/lib")
575 "--with-openblas-incdir=" (assoc-ref %build-inputs "openblas") "/include")
577 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
579 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
581 (list autoconf automake libtool))
583 `(("openblas" ,openblas)
585 (home-page "http://www.astromatic.net/software/sextractor")
586 (synopsis "Extract catalogs of sources from astronomical images")
588 "SExtractor is a program that builds a catalogue of objects from an
589 astronomical image. Although it is particularly oriented towards reduction of
590 large scale galaxy-survey data, it can perform reasonably well on moderately
591 crowded star fields.")
592 (license license:gpl3+)))
594 (define-public skymaker
601 (uri (string-append "https://www.astromatic.net/download/skymaker/"
602 "skymaker-" version ".tar.gz"))
604 (base32 "03zvx7c89plp9559niqv5532r233kza3ir992rg3nxjksqmrqvx1"))))
605 (build-system gnu-build-system)
610 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
612 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
615 (home-page "https://www.astromatic.net/software/skymaker")
616 (synopsis "Astronomical image simulator")
618 "SkyMaker is a program that simulates astronomical images. It accepts
619 object lists in ASCII generated by the Stuff program to produce realistic
620 astronomical fields. SkyMaker is part of the EFIGI
621 (@url{https://www.astromatic.net/projects/efigi}) development project.")
622 (license license:gpl3+)))
624 (define-public stackistry
632 (url "https://github.com/GreatAttractor/stackistry")
633 (commit (string-append "v" version))))
634 (file-name (git-file-name name version))
636 (base32 "0rz29v33n0x0k40hv3v79ym5ylch1v0pbph4i21809gz2al5p7dq"))))
637 (build-system gnu-build-system)
642 "SKRY_INCLUDE_PATH=" (assoc-ref %build-inputs "libskry") "/include")
644 "SKRY_LIB_PATH=-L" (assoc-ref %build-inputs "libskry") "/lib")
646 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
648 (modify-phases %standard-phases
649 ;; no configure and tests are provided
652 (add-after 'unpack 'fix-paths
653 (lambda* (#:key outputs #:allow-other-keys)
654 (substitute* "src/main.cpp"
655 (("\"\\.\\.\", \"lang\"")
656 "\"../share/stackistry\", \"lang\""))
657 (substitute* "src/utils.cpp"
658 (("\"\\.\\.\", \"icons\"")
659 "\"../share/stackistry\", \"icons\""))
662 ;; The Makefile lacks an ‘install’ target.
663 (lambda* (#:key outputs #:allow-other-keys)
664 (let* ((out (assoc-ref outputs "out"))
665 (bin (string-append out "/bin"))
666 (icons (string-append out "/share/stackistry/icons"))
667 (lang (string-append out "/share/stackistry/lang")))
668 (copy-recursively "bin" bin)
669 (copy-recursively "icons" icons)
670 (copy-recursively "lang" lang))
675 (list gtkmm-3 libskry ffmpeg))
676 (home-page "https://github.com/GreatAttractor/stackistry")
677 (synopsis "Astronomical lucky imaging/image stacking tool")
679 "Stackistry implements the lucky imaging principle of astronomical
680 imaging: creating a high-quality still image out of a series of many (possibly
681 thousands) low quality ones (blurred, deformed, noisy). The resulting image
682 stack typically requires post-processing, including sharpening (e.g. via
683 deconvolution). Such post-processing is not performed by Stackistry.")
684 (license license:gpl3+)))
686 (define-public stellarium
693 (uri (string-append "https://github.com/Stellarium/stellarium"
694 "/releases/download/v" version
695 "/stellarium-" version ".tar.gz"))
697 (base32 "049jlc8vx06pad5h2syrmf7f1l346yr5iraai0wkn8s8pk30j8q7"))))
698 (build-system cmake-build-system)
707 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
708 ("perl" ,perl) ; for pod2man
709 ("qtbase" ,qtbase-5) ; Qt MOC is needed at compile time
710 ("qttools-5" ,qttools-5)))
712 `(#:test-target "test"
713 #:configure-flags (list "-DENABLE_TESTING=1"
715 "-DCMAKE_CXX_FLAGS=-isystem "
716 (assoc-ref %build-inputs "qtserialport")
718 #:phases (modify-phases %standard-phases
719 (add-before 'check 'set-offscreen-display
721 ;; Make Qt render "offscreen", required for tests.
722 (setenv "QT_QPA_PLATFORM" "offscreen")
723 (setenv "HOME" "/tmp")
725 (home-page "https://stellarium.org/")
726 (synopsis "3D sky viewer")
727 (description "Stellarium is a planetarium. It shows a realistic sky in
728 3D, just like what you see with the naked eye, binoculars, or a telescope. It
729 can be used to control telescopes over a serial port for tracking celestial
731 (license license:gpl2+)))
740 (uri (string-append "https://www.astromatic.net/download/stuff/"
741 "stuff-" version ".tar.gz"))
743 (base32 "1syibi3b86z9pikhicvkkmgxm916j732fdiw0agw0lq6z13fdcjm"))))
744 (build-system gnu-build-system)
745 (home-page "https://www.astromatic.net/software/stuff")
746 (synopsis "Astronomical catalogue simulation")
748 "Stuff is a program that simulates \"perfect\" astronomical catalogues.
749 It generates object lists in ASCII which can read by the SkyMaker program to
750 produce realistic astronomical fields. Stuff is part of the EFIGI development
752 (license license:gpl3+)))
761 (uri (string-append "https://www.astromatic.net/download/swarp/"
762 "swarp-" version ".tar.gz"))
764 (base32 "1i670waqp54vin1cn08mqckcggm9zqd69nk7yya2vvqpdizn6jpm"))))
765 (build-system gnu-build-system)
766 (home-page "https://www.astromatic.net/software/swarp")
767 (synopsis "FITS image resampling and co-addition")
769 "SWarp is a program that resamples and co-adds together FITS images using
770 any arbitrary astrometric projection defined in the WCS standard.")
771 (license license:gpl3+)))
773 (define-public celestia
774 (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce"))
777 (version (git-version "1.6.1" "815" commit))
781 (url "https://github.com/celestiaproject/celestia")
783 (file-name (git-file-name name version))
786 "00xibg87l1arzifakgj7s828x9pszcgx7x7ij88a561ig49ryh78"))))
787 (build-system cmake-build-system)
791 ("pkg-config" ,pkg-config)
793 ("gettext" ,gettext-minimal)))
797 ("libtheora" ,libtheora)
798 ("libjpeg" ,libjpeg-turbo)
802 ;; optional: fmtlib, Eigen3;
805 ;; glut: for glut interface
806 ("freeglut" ,freeglut)))
810 `(#:configure-flags '("-DENABLE_GLUT=ON" "-DENABLE_QT=OFF")
811 #:tests? #f)) ;no tests
812 (home-page "https://celestia.space/")
813 (synopsis "Real-time 3D visualization of space")
815 "This simulation program lets you explore our universe in three
816 dimensions. Celestia simulates many different types of celestial objects.
817 From planets and moons to star clusters and galaxies, you can visit every
818 object in the expandable database and view it from any point in space and
819 time. The position and movement of solar system objects is calculated
820 accurately in real time at any rate desired.")
821 (license license:gpl2+))))
823 (define-public celestia-gtk
826 (name "celestia-gtk")
828 (append (alist-delete "freeglut" (package-inputs celestia))
830 ("gtkglext" ,gtkglext))))
832 `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
835 (define-public python-astropy
837 (name "python-astropy")
842 (uri (pypi-uri "astropy" version))
844 (base32 "09wh589ywjsgjvi76v2d2zqd9sri0461rrnml0b0pah5lbkcv0k3"))
845 (modules '((guix build utils)))
848 ;; Remove Python bundles.
849 (with-directory-excursion "astropy/extern"
850 (for-each delete-file-recursively '("ply" "configobj")))
851 ;; Remove cextern bundles and leave the wcslib bundle. Astropy
852 ;; upgrades to different versions of wcslib every few releases
853 ;; and tests break every upgrade.
854 ;; TODO: unbundle wcslib.
855 (with-directory-excursion "cextern"
856 (for-each delete-file-recursively '("cfitsio" "expat")))
858 (build-system python-build-system)
861 (modify-phases %standard-phases
862 (add-after 'unpack 'preparations
864 ;; Use our own libraries in place of bundles, with the
865 ;; exception of wcslib.
866 (setenv "ASTROPY_USE_SYSTEM_CFITSIO" "1")
867 (setenv "ASTROPY_USE_SYSTEM_EXPAT" "1")
868 ;; Some tests require a writable home.
869 (setenv "HOME" "/tmp")
870 ;; Relax xfail tests.
871 (substitute* "setup.cfg"
872 (("xfail_strict = true") "xfail_strict = false"))
873 ;; Replace all references to external ply.
874 (let ((ply-files '("coordinates/angle_formats.py"
875 "utils/parsing.py")))
876 (with-directory-excursion "astropy"
878 (substitute* file (("astropy.extern.ply")
881 ;; Replace reference to external configobj.
882 (with-directory-excursion "astropy/config"
883 (substitute* "configuration.py"
884 (("from astropy.extern.configobj ") "")))))
885 ;; This file is opened in both install and check phases.
886 (add-before 'install 'writable-compiler
887 (lambda _ (make-file-writable "astropy/_compiler.c")))
888 (add-before 'check 'writable-compiler
889 (lambda _ (make-file-writable "astropy/_compiler.c")))
891 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
893 (add-installed-pythonpath inputs outputs)
894 ;; Extensions have to be rebuilt before running the tests.
895 (invoke "python" "setup.py" "build_ext" "--inplace")
896 (invoke "python" "-m" "pytest" "--pyargs" "astropy"
897 ;; Skip tests that need remote data.
898 "-m" "not remote_data")))))))
903 python-extension-helpers
908 python-pytest-astropy
910 python-setuptools-scm
914 (list cfitsio expat))
916 (list python-configobj
922 (home-page "https://www.astropy.org/")
923 (synopsis "Core package for Astronomy in Python")
925 "Astropy is a single core package for Astronomy in Python. It contains
926 much of the core functionality and some common tools needed for performing
927 astronomy and astrophysics.")
928 (license license:bsd-3)))
930 (define-public python-astropy-healpix
932 (name "python-astropy-healpix")
937 (uri (pypi-uri "astropy-healpix" version))
939 (base32 "1436ml03xkmvx4afzbhfj67ab91418sz1w3lq1b18r43qchnd6j0"))))
940 (build-system python-build-system)
943 (modify-phases %standard-phases
944 ;; This file is opened in both install and check phases.
945 (add-before 'install 'writable-compiler
946 (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
947 (add-before 'check 'writable-compiler
948 (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
950 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
952 (add-installed-pythonpath inputs outputs)
953 ;; Extensions have to be rebuilt before running the tests.
954 (invoke "python" "setup.py" "build_ext" "--inplace")
955 (invoke "python" "-m" "pytest"
956 "--pyargs" "astropy_healpix")))))))
958 (list python-extension-helpers
960 python-pytest-astropy
961 python-setuptools-scm))
963 (list python-astropy python-numpy))
964 (home-page "https://github.com/astropy/astropy-healpix")
965 (synopsis "HEALPix for Astropy")
966 (description "This package provides HEALPix to the Astropy project.")
967 (license license:bsd-3)))
969 (define-public python-astroquery
971 (name "python-astroquery")
976 (uri (pypi-uri "astroquery" version))
978 (base32 "1vhkzsqlgn3ji5by2rdf2gwklhbyzvpzb1iglalhqjkkrdaaaz1h"))))
979 (build-system python-build-system)
982 (modify-phases %standard-phases
983 (add-before 'check 'writable-home
984 (lambda _ ; some tests need a writable home
985 (setenv "HOME" (getcwd))))
987 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
989 (add-installed-pythonpath inputs outputs)
990 (invoke "python" "-m" "pytest" "--pyargs" "astroquery"
991 ;; Skip tests that require online data.
992 "-m" "not remote_data")))))))
995 python-beautifulsoup4
1005 python-pytest-astropy
1006 python-pytest-dependency))
1007 (home-page "https://www.astropy.org/astroquery/")
1008 (synopsis "Access online astronomical data resources")
1009 (description "Astroquery is a package that contains a collection of tools
1010 to access online Astronomical data. Each web service has its own sub-package.")
1011 (license license:bsd-3)))
1013 (define-public python-cdflib
1015 (name "python-cdflib")
1019 (method git-fetch) ; no tests in pypi archive
1021 (url "https://github.com/MAVENSDC/cdflib")
1023 (file-name (git-file-name name version))
1025 (base32 "1h7750xvr6qbhnl2w3bhccs3pwp3hci3624pvvxym0yjinmskjlz"))))
1026 (build-system python-build-system)
1029 #~(modify-phases %standard-phases
1031 (lambda* (#:key tests? #:allow-other-keys)
1033 (setenv "HOME" (getcwd))
1034 (invoke "pytest" "-vv" "tests")))))))
1036 (list python-attrs python-numpy))
1038 (list python-astropy
1042 python-pytest-remotedata
1044 (home-page "https://github.com/MAVENSDC/cdflib")
1045 (synopsis "Python library to deal with NASA's CDF astronmical data format")
1046 (description "This package provides a Python CDF reader toolkit
1047 It provides the following functionality:
1049 @item Ability to read variables and attributes from CDF files
1050 @item Writes CDF version 3 files
1051 @item Can convert between CDF time types (EPOCH/EPOCH16/TT2000) to other common
1053 @item Can convert CDF files into XArray Dataset objects and vice versa,
1054 attempting to maintain ISTP compliance
1056 (license license:expat)))
1058 (define-public python-ephem
1060 (name "python-ephem")
1064 (uri (pypi-uri "ephem" version))
1067 "0smmm3l8csnw9rrimh8mpyjrm80jaafjl184spnji98vk22qd8bz"))))
1068 (build-system python-build-system)
1069 (native-inputs (list tzdata))
1070 (home-page "https://rhodesmill.org/pyephem/")
1071 (synopsis "Compute positions of the planets and stars")
1073 "PyEphem provides an @code{ephem} Python package for performing
1074 high-precision astronomy computations.
1076 The name ephem is short for the word ephemeris, which is the traditional term
1077 for a table giving the position of a planet, asteroid, or comet for a series
1079 (license license:expat)))
1081 (define-public python-photutils
1083 (name "python-photutils")
1088 (uri (pypi-uri "photutils" version))
1090 (base32 "1a8djakaya6w5iv9237gkcz39brqzgrfs2wqrl0izi1s85cfdymn"))))
1091 (build-system python-build-system)
1093 `(#:test-target "pytest"
1095 (modify-phases %standard-phases
1096 ;; This file is opened in both install and check phases.
1097 (add-before 'install 'writable-compiler
1098 (lambda _ (make-file-writable "photutils/_compiler.c")))
1099 (add-before 'check 'writable-compiler
1100 (lambda _ (make-file-writable "photutils/_compiler.c"))))))
1102 (list python-astropy python-numpy))
1105 python-extension-helpers
1106 python-pytest-astropy
1107 python-pytest-runner
1108 python-setuptools-scm))
1109 (home-page "https://github.com/astropy/photutils")
1110 (synopsis "Source detection and photometry")
1111 (description "Photutils is an Astropy package for detection and photometry
1112 of astronomical sources.")
1113 (license license:bsd-3)))
1115 (define-public python-pyvo
1117 (name "python-pyvo")
1122 (uri (pypi-uri "pyvo" version))
1124 (base32 "1ri5yp6903386lkn79mdcmlax7zsfrrrjbcvb91wxydcc9yasc1n"))))
1125 (build-system python-build-system)
1128 (modify-phases %standard-phases
1130 (lambda* (#:key tests? #:allow-other-keys)
1132 (invoke "python" "-m" "pytest" "--pyargs" "pyvo" "-k"
1133 (string-append ; these tests use the network
1134 "not test_access_with_string"
1135 " and not test_access_with_list"
1136 " and not test_access_with_expansion"))))))))
1138 (list python-pytest-astropy python-requests-mock))
1140 (list python-astropy python-mimeparse python-pillow python-requests))
1141 (home-page "https://github.com/astropy/pyvo")
1142 (synopsis "Access Virtual Observatory data and services")
1144 "PyVO is a package providing access to remote data and services of the
1145 Virtual observatory (VO) using Python.")
1146 (license license:bsd-3)))
1148 (define-public python-regions
1150 (name "python-regions")
1155 (uri (pypi-uri "regions" version))
1157 (base32 "1bjrcjchbw3xw1a26d5g198lh7vxpp9m5sal58r7f8mmr1d8g2dc"))))
1158 (build-system python-build-system)
1160 `(#:test-target "pytest"
1162 (modify-phases %standard-phases
1163 ;; This doctest requires online data.
1164 (add-after 'unpack 'delete-doctest
1165 (lambda _ (delete-file "docs/masks.rst")))
1166 ;; This file is opened in both install and check phases.
1167 (add-before 'install 'writable-compiler
1168 (lambda _ (make-file-writable "regions/_compiler.c")))
1169 (add-before 'check 'writable-compiler
1170 (lambda _ (make-file-writable "regions/_compiler.c")))
1171 (add-before 'check 'writable-home
1172 (lambda _ (setenv "HOME" (getcwd)))))))
1174 (list python-astropy python-numpy))
1177 python-extension-helpers
1178 python-pytest-arraydiff
1179 python-pytest-astropy
1180 python-pytest-runner
1181 python-setuptools-scm))
1182 (home-page "https://github.com/astropy/regions")
1183 (synopsis "Package for region handling")
1184 (description "Regions is an Astropy package for region handling.")
1185 (license license:bsd-3)))
1187 (define-public python-astral
1189 (name "python-astral")
1194 (uri (pypi-uri "astral" version))
1196 (base32 "1gkggdibccmdy9glymw3kbrkzm6svvsg0lk56hhy92y4smkrj7g4"))))
1197 (build-system python-build-system)
1200 (modify-phases %standard-phases
1202 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1204 (add-installed-pythonpath inputs outputs)
1205 (invoke "python" "-m" "pytest")))))))
1207 (list python-freezegun python-setuptools-scm))
1209 (list python-dataclasses python-pytest python-pytz))
1210 (home-page "https://github.com/sffjunkie/astral")
1211 (synopsis "Calculations for the position of the sun and moon")
1212 (description "Astral is a Python module that calculates times for various
1213 positions of the sun: dawn, sunrise, solar noon, sunset, dusk, solar
1214 elevation, solar azimuth, rahukaalam, and the phases of the moon.")
1215 (license license:asl2.0)))
1217 (define-public libnova
1225 (url "https://git.code.sf.net/p/libnova/libnova.git")
1226 (commit (string-append "v" version))))
1227 (file-name (git-file-name name version))
1230 "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b"))))
1231 (build-system gnu-build-system)
1234 (modify-phases %standard-phases
1235 (add-after 'unpack 'patch-git-version
1237 (substitute* "./git-version-gen"
1238 (("/bin/sh") (which "sh")))
1241 (list autoconf automake libtool))
1242 (synopsis "Celestial mechanics, astrometry and astrodynamics library")
1243 (description "Libnova is a general purpose, double precision, Celestial
1244 Mechanics, Astrometry and Astrodynamics library.")
1245 (home-page "http://libnova.sourceforge.net/")
1246 (license (list license:lgpl2.0+
1247 license:gpl2+)))) ; examples/transforms.c & lntest/*.c
1249 (define-public libsep
1257 (url "https://github.com/kbarbary/sep")
1258 (commit (string-append "v" version))))
1259 (file-name (git-file-name name version))
1261 (base32 "0sag96am6r1ffh9860yq40js874362v3132ahlm6sq7padczkicf"))))
1262 (build-system cmake-build-system)
1265 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1266 (string-append "PREFIX=" #$output))
1267 #:phases #~(modify-phases %standard-phases
1269 (lambda* (#:key tests? #:allow-other-keys)
1273 (string-append "CC=" #$(cc-for-target))
1276 (list python-wrapper))
1277 (home-page "https://github.com/kbarbary/sep")
1278 (synopsis "Astronomical source extraction and photometry library")
1280 "SEP makes the core algorithms of
1281 @url{https://www.astromatic.net/software/sextractor/, sextractor} available as a
1282 library of stand-alone functions and classes. These operate directly on
1283 in-memory arrays (no FITS files or configuration files). The code is derived
1284 from the Source Extractor code base (written in C) and aims to produce results
1285 compatible with Source Extractor whenever possible. SEP consists of a C library
1286 with no dependencies outside the standard library, and a Python module that
1287 wraps the C library in a Pythonic API. The Python wrapper operates on NumPy
1288 arrays with NumPy as its only dependency.")
1289 (license (list license:expat license:lgpl3+ license:bsd-3))))
1291 (define-public libskry
1299 (url "https://github.com/GreatAttractor/libskry")
1300 (commit (string-append "v" version))))
1301 (file-name (git-file-name name version))
1303 (base32 "14kwng0j8wqzlb0gqg3ayq36l15dpz7kvxc56fa47j55b376bwh6"))))
1304 (build-system gnu-build-system)
1309 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
1311 (modify-phases %standard-phases
1312 (delete 'configure) ;; no configure provided
1313 (delete 'check) ;; no tests provided
1315 ;; The Makefile lacks an ‘install’ target.
1316 (lambda* (#:key outputs #:allow-other-keys)
1317 (let* ((out (assoc-ref outputs "out"))
1318 (lib (string-append out "/lib"))
1319 (include (string-append out "/include")))
1320 (copy-recursively "bin" lib)
1321 (copy-recursively "include" include))
1325 (home-page "https://github.com/GreatAttractor/libskry")
1326 (synopsis "Astronimical lucky imaging library")
1328 "@code{libskry} implements the lucky imaging principle of astronomical
1329 imaging: creating a high-quality still image out of a series of many thousands)
1331 (license license:gpl3+)))
1333 (define-public libpasastro
1334 ;; NOTE: (Sharlatan-20210122T215921+0000): the version tag has a build
1335 ;; error on spice which is resolved with the latest commit.
1336 (let ((commit "e3c218d1502a18cae858c83a9a8812ab197fcb60")
1339 (name "libpasastro")
1340 (version (git-version "1.4.0" revision commit))
1344 (url "https://github.com/pchev/libpasastro")
1346 (file-name (git-file-name name version))
1349 "0asp2sn34nds5va2ghppwc41vb6j3d1mf049j949rgrll817kx47"))))
1350 (build-system gnu-build-system)
1355 ,(match (or (%current-target-system) (%current-system))
1356 ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
1359 ,(match (or (%current-target-system) (%current-system))
1360 ("i686-linux" "CPU_TARGET=i386")
1361 ("x86_64-linux" "CPU_TARGET=x86_64")
1362 ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
1364 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1366 (modify-phases %standard-phases
1367 (delete 'configure))))
1368 (home-page "https://github.com/pchev/libpasastro")
1369 (synopsis "Interface to astronomy library for use from Pascal program")
1371 "This package provides shared libraries to interface Pascal program with
1372 standard astronomy libraries:
1375 @item @code{libpasgetdss.so}: Interface with GetDSS to work with DSS images.
1376 @item @code{libpasplan404.so}: Interface with Plan404 to compute planets position.
1377 @item @code{libpaswcs.so}: Interface with libwcs to work with FITS WCS.
1378 @item @code{libpasspice.so}: To work with NAIF/SPICE kernel.
1380 (license license:gpl2+))))
1382 (define-public missfits
1389 (uri (string-append "https://www.astromatic.net/download/missfits/"
1390 "missfits-" version ".tar.gz"))
1392 (base32 "04jrd7fsvzr14vdmwgj2f6v97gdcfyjyz6jppml3ghr9xh12jxv5"))))
1393 (build-system gnu-build-system)
1394 (home-page "https://www.astromatic.net/software/missfits")
1395 (synopsis "FITS files Maintenance program")
1397 "MissFITS is a program that performs basic maintenance and packaging tasks
1401 @item add/edit FITS header keywords
1402 @item split/join Multi-Extension-FITS (MEF) files
1403 @item unpack/pack FITS data-cubes
1404 @item create/check/update FITS checksums, using R. Seaman's protocol
1405 (see http://www.adass.org/adass/proceedings/adass94/seamanr.html)
1407 (license license:gpl3+)))
1409 (define-public xplanet
1418 "mirror://sourceforge/xplanet/xplanet/"
1419 version "/xplanet-" version ".tar.gz"))
1421 (base32 "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023"))
1424 "xplanet-1.3.1-cxx11-eof.patch"
1425 "xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch"
1426 "xplanet-1.3.1-libimage_gif.c.patch"
1427 "xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch"))))
1428 (build-system gnu-build-system)
1432 `(("libx11" ,libx11)
1433 ("libxscrnsaver" ,libxscrnsaver)
1435 ("freetype" ,freetype)
1438 ("libjpeg" ,libjpeg-turbo)
1440 ("libtiff" ,libtiff)
1445 (let ((netpbm (assoc-ref %build-inputs "netpbm")))
1447 ;; Give correct path for pnm.h header to configure script
1448 (string-append "CPPFLAGS=-I" netpbm "/include/netpbm")
1449 ;; no nasa jpl cspice support
1450 "--without-cspice" )))))
1451 (home-page "http://xplanet.sourceforge.net/")
1452 (synopsis "Planetary body renderer")
1454 "Xplanet renders an image of a planet into an X window or file.
1455 All of the major planets and most satellites can be drawn and different map
1456 projections are also supported, including azimuthal, hemisphere, Lambert,
1457 Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
1458 (license license:gpl2+)))
1460 (define-public gpredict
1467 (uri (string-append "https://github.com/csete/gpredict/releases"
1468 "/download/v" version
1469 "/gpredict-" version ".tar.bz2"))
1471 (base32 "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"))))
1472 (build-system gnu-build-system)
1474 `(("intltool" ,intltool)
1475 ("gettext" ,gettext-minimal)
1476 ("pkg-config" ,pkg-config)))
1478 (list curl glib goocanvas gtk+))
1480 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
1482 (modify-phases %standard-phases
1483 (add-after 'unpack 'fix-tests
1485 ;; Remove reference to non-existent file.
1486 (substitute* "po/POTFILES.in"
1487 (("src/gtk-sat-tree\\.c")
1490 (synopsis "Satellite tracking and orbit prediction application")
1492 "Gpredict is a real-time satellite tracking and orbit prediction
1493 application. It can track a large number of satellites and display their
1494 position and other data in lists, tables, maps, and polar plots (radar view).
1495 Gpredict can also predict the time of future passes for a satellite, and
1496 provide you with detailed information about each pass.")
1497 (home-page "http://gpredict.oz9aec.net/index.php")
1498 (license license:gpl2+)))
1501 ;; No tagged releases, use commit directly.
1502 (let ((commit "ca9d4d97af4ee62461de6f13e0c85d1dc6000040")
1506 (version (git-version "0.0.0" revision commit))
1511 (url "https://github.com/dnwrnr/sgp4")
1513 (file-name (git-file-name name version))
1515 (base32 "1xwfa6papmd2qz5w0hwzvijmzvp9np8dlw3q3qz4bmsippzjv8p7"))))
1516 (build-system cmake-build-system)
1519 (modify-phases %standard-phases
1522 ;; Tests fails, probably because of a few "(e <= -0.001)" errors.
1523 ;; Or maybe this is not the right way to run the tests?
1524 ;; (invoke "runtest/runtest")
1526 (home-page "https://github.com/dnwrnr/sgp4")
1527 (synopsis "Simplified perturbations models library")
1529 "This is a library implementing the simplified perturbations model.
1530 It can be used to calculate the trajectory of satellites.")
1531 (license license:asl2.0))))
1533 (define-public imppg
1541 (url "https://github.com/GreatAttractor/imppg")
1542 (commit (string-append "v" version))))
1543 (file-name (git-file-name name version))
1545 (base32 "04synbmyz0hkipl1cdc26nr42r57v494yjw8pi4jx0jrxrawgj9h"))))
1546 (build-system cmake-build-system)
1548 `(#:tests? #f ;no test provided
1550 (modify-phases %standard-phases
1552 (lambda* (#:key outputs #:allow-other-keys)
1557 "-G" "Unix Makefiles"
1558 "-DCMAKE_BUILD_TYPE=Release"
1559 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref outputs "out"))
1562 (list boost pkg-config))
1564 (list cfitsio freeimage glew wxwidgets))
1565 (home-page "https://github.com/GreatAttractor/imppg")
1566 (synopsis "Astronomical Image Post-Proccessor (ImPPG)")
1568 "ImPPG performs Lucy-Richardson deconvolution, unsharp masking,
1569 brightness normalization and tone curve adjustment. It can also apply
1570 previously specified processing settings to multiple images. All operations
1571 are performed using 32-bit floating-point arithmetic.
1573 Supported input formats: FITS, BMP, JPEG, PNG, TIFF (most of bit depths and
1574 compression methods), TGA and more. Images are processed in grayscale and can
1575 be saved as: BMP 8-bit; PNG 8-bit; TIFF 8-bit, 16-bit, 32-bit
1576 floating-point (no compression, LZW- or ZIP-compressed), FITS 8-bit, 16-bit,
1577 32-bit floating-point.")
1578 (license license:gpl3+)))
1588 (url "https://github.com/indilib/indi")
1589 (commit (string-append "v" version))))
1590 (file-name (git-file-name name version))
1592 (base32 "0c7md288d3g2vf0m1ai6x2l4j4rmlasc4rya92phvd4ynf8vcki2"))))
1593 (build-system cmake-build-system)
1596 (let ((out (assoc-ref %outputs "out")))
1598 "-DINDI_BUILD_UNITTESTS=ON"
1599 "-DCMAKE_BUILD_TYPE=Release"
1600 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1601 (string-append "-DUDEVRULES_INSTALL_DIR=" out "/lib/udev/rules.d")))
1603 (modify-phases %standard-phases
1605 (lambda* (#:key tests? #:allow-other-keys)
1607 (with-directory-excursion "test"
1608 (invoke "ctest")))))
1609 (add-before 'install 'set-install-directories
1610 (lambda* (#:key outputs #:allow-other-keys)
1611 (let ((out (assoc-ref outputs "out")))
1612 (mkdir-p (string-append out "/lib/udev/rules.d"))))))))
1625 (home-page "https://www.indilib.org")
1626 (synopsis "Library for astronimical intrumentation control")
1628 "INDI (Instrument-Neutral Device Interface) is a distributed XML-based
1629 control protocol designed to operate astronomical instrumentation. INDI is
1630 small, flexible, easy to parse, scalable, and stateless. It supports common
1631 DCS functions such as remote control, data acquisition, monitoring, and a lot
1633 (license (list license:bsd-3
1636 license:lgpl2.1+))))
1638 (define-public sunclock
1639 (let ((commit "f4106eb0a81f7594726d6b2859efd8fc64cc1225")
1643 (version (git-version "3.57" revision commit))
1648 (url "https://github.com/nongiach/Sunclock")
1650 (file-name (git-file-name name version))
1652 (base32 "1rczdpmhvfw57b9r793vq8vqlbdhlkgj52fxwrdfl6cwj95a9kv2"))))
1653 (build-system gnu-build-system)
1656 (list (string-append "DESTDIR=" %output)
1657 ;; Fix incorrect argument given to gcc. Error message:
1658 ;; "gcc: error: DefaultGcc2AMD64Opt: No such file or directory"
1661 (modify-phases %standard-phases
1664 (chdir "sunclock-3.57")
1665 (substitute* "Imakefile"
1666 (("^MANDIR=/X11R6/man/man1")
1667 "MANDIR=/share/man/man1")
1668 (("^BINDIR=/X11R6/bin")
1670 ;; Disable ZLIB support for vmf files because zlib implements
1671 ;; `gzgetc` as a macro instead of a function, which results in
1672 ;; a compilation error.
1675 (("cd \\$\\(DESTDIR\\)\\$\\(SHAREDIR\\)/earthmaps/vmf ; \
1678 ;; Generate Makefile.
1680 #:tests? #f)) ; No check target.
1682 (list libjpeg-turbo libpng libx11 libxpm))
1685 (home-page "https://github.com/nongiach/Sunclock")
1687 "Map of the Earth that shows which portion is illuminated by the Sun")
1689 "Sunclock displays a map of the Earth and shows which portion is
1690 illuminated by the Sun. It can commute between two states, the \"clock window\"
1691 and the \"map window\". The clock window displays a small map of the Earth and
1692 therefore occupies little space on the screen, while the \"map window\" displays
1693 a large map and offers more advanced functions: local time of cities, Sun and
1694 Moon position, etc.")
1695 (license license:gpl2+))))
1697 (define-public python-jplephem
1699 (name "python-jplephem")
1704 (uri (pypi-uri "jplephem" version))
1706 (base32 "09xaibxnwbzzs3x9g3ibqa2la17z3r6in93321glh02dbibfbip1"))))
1707 (build-system python-build-system)
1710 (modify-phases %standard-phases
1712 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1714 (let ((out (assoc-ref outputs "out")))
1715 (add-installed-pythonpath inputs outputs)
1716 (setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
1717 (invoke "python" "-m" "unittest" "discover" "-s" "test"))))))))
1719 (list python-numpy))
1720 (home-page "https://github.com/brandon-rhodes/python-jplephem")
1721 (synopsis "Python version of NASA DE4xx ephemerides")
1723 "The package is a Python implementation of the mathematics that standard
1724 JPL ephemerides use to predict raw (x,y,z) planetary positions.")
1725 (license license:expat)))
1727 (define-public python-pyerfa
1729 (name "python-pyerfa")
1734 (uri (pypi-uri "pyerfa" version))
1736 (base32 "0c6y1rm51kj8ahbr1vwbswck3ix77dc3zhc2fkg6w7iczrzn7m1g"))
1737 (modules '((guix build utils)))
1740 ;; Remove bundled submodule library.
1741 (delete-file-recursively "liberfa")
1743 (build-system python-build-system)
1746 (modify-phases %standard-phases
1747 (add-before 'build 'use-system-liberfa
1749 (setenv "PYERFA_USE_SYSTEM_LIBERFA" "1"))))))
1751 (list python-pytest-doctestplus python-pytest python-setuptools-scm))
1755 (list python-numpy))
1756 (home-page "https://github.com/liberfa/pyerfa")
1757 (synopsis "Python bindings for ERFA")
1759 "PyERFA is the Python wrapper for the ERFA library (Essential
1760 Routines for Fundamental Astronomy), a C library containing key algorithms for
1761 astronomy, which is based on the SOFA library published by the International
1762 Astronomical Union (IAU). All C routines are wrapped as Numpy universal
1763 functions, so that they can be called with scalar or array inputs.")
1764 (license license:bsd-3)))
1766 (define-public python-pynbody
1768 (name "python-pynbody")
1773 (uri (pypi-uri "pynbody" version))
1775 (base32 "1jxwk2s4qz1znvyak2lj7ld01kl1jh87xp81ki7a8dz1gcy93fkx"))))
1776 (build-system python-build-system)
1779 #~(modify-phases %standard-phases
1780 (add-after 'unpack 'disable-tests-require-testdata
1782 ;; Disable tests which need to download additional 1.0GiB+
1783 ;; of test data archive from
1784 ;; http://star.ucl.ac.uk/~app/testdata.tar.gz
1785 ;; https://github.com/pynbody/pynbody/blob/ \
1786 ;; f4bd482dc47532831b3ec115c7cb07149d61bfc5/ \
1787 ;; .github/workflows/build-test.yaml#L41
1788 (with-directory-excursion "tests"
1789 (for-each delete-file
1796 "partial_tipsy_test.py"
1804 "ramses_new_ptcl_format_test.py"
1808 "sph_smooth_test.py"
1810 "subfindhdf_gadget4_test.py"
1811 "tipsy_test.py")))))
1813 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1815 (add-installed-pythonpath inputs outputs)
1816 (setenv "HOME" "/tmp")
1817 (invoke "pytest" "-vv")))))))
1828 (home-page "https://pynbody.github.io/pynbody/index.html")
1829 (synopsis "Light-weight astronomical N-body/SPH analysis for python")
1830 (description "@code{Pynbody} is an analysis framework for N-body and hydrodynamic
1831 astrophysical simulations supporting PKDGRAV/Gasoline, Gadget, Gadget4/Arepo,
1832 N-Chilada and RAMSES AMR outputs.")
1833 (license license:gpl3+)))
1835 (define-public python-sep
1839 (build-system python-build-system)
1841 (strip-keyword-arguments
1842 '(#:make-flags) (package-arguments libsep)))
1844 (modify-inputs (package-inputs libsep)
1845 (prepend python-cython)))
1847 (modify-inputs (package-inputs libsep)
1848 (prepend python-numpy)))))
1850 (define-public python-suntime
1852 (name "python-suntime")
1856 (uri (pypi-uri "suntime" version))
1859 "0ja64w293wjx76q3z18ikx4rdihwkbj6pnjpbs82ycyyzhfnbpz4"))))
1860 (build-system python-build-system)
1861 (propagated-inputs (list python-dateutil))
1862 (home-page "https://github.com/SatAgro/suntime")
1863 (synopsis "Sunset and sunrise time calculation python library")
1865 "Python library doing sunrise and sunset time calculation.
1867 Takes a WGS84 (GPS) latitude/longitude as input as well as an UTC or local
1869 (license license:lgpl3+)))
1871 (define-public python-asdf
1873 (name "python-asdf")
1878 (uri (pypi-uri "asdf" version))
1880 (base32 "0i4vq1hsympjgb1yvn4ql0gm8j1mki9ggmj03533kmg0nbzp03yy"))))
1881 (build-system python-build-system)
1883 ;; NOTE: (Sharlatan-20211229T201059+0000): Tests depend on astropy and
1884 ;; gwcs, astropy gwcs depend on asdf. Disable circular dependence.
1887 (list python-setuptools-scm
1888 python-semantic-version
1891 (list python-importlib-resources
1896 (home-page "https://github.com/asdf-format/asdf")
1897 (synopsis "Python tools to handle ASDF files")
1899 "The Advanced Scientific Data Format (ASDF) is a next-generation
1900 interchange format for scientific data. This package contains the Python
1901 implementation of the ASDF Standard.")
1902 (license license:bsd-3)))
1904 (define python-asdf-transform-schemas
1906 (name "python-asdf-transform-schemas")
1911 (uri (pypi-uri "asdf_transform_schemas" version))
1913 (base32 "1gmzd81hw4ppsvzrc91wcbjpcw9hhv9gavllv7nyi7qjb54c837g"))))
1914 (build-system python-build-system)
1917 (modify-phases %standard-phases
1919 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1921 (add-installed-pythonpath inputs outputs)
1922 (invoke "python" "-m" "pytest")))))))
1925 python-semantic-version
1926 python-setuptools-scm))
1929 (home-page "https://github.com/asdf-format/asdf-transform-schemas")
1930 (synopsis "ASDF schemas for transforms")
1932 "This package provides ASDF schemas for validating transform tags. Users
1933 should not need to install this directly; instead, install an implementation
1934 package such as asdf-astropy.")
1935 (license license:bsd-3)))
1937 (define python-asdf-coordinates-schemas
1939 (name "python-asdf-coordinates-schemas")
1944 (uri (pypi-uri "asdf_coordinates_schemas" version))
1946 (base32 "0ahwhsz5jzljnpkfd2kvspirg823lnj5ip9sfkd9cx09z1nlz8jg"))))
1947 (build-system python-build-system)
1950 (modify-phases %standard-phases
1952 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1954 (add-installed-pythonpath inputs outputs)
1955 (invoke "python" "-m" "pytest")))))))
1958 python-semantic-version
1959 python-setuptools-scm))
1962 (home-page "https://github.com/asdf-format/asdf-coordinates-schemas")
1963 (synopsis "ASDF coordinates schemas")
1964 (description "This package provides ASDF schemas for validating
1965 coordinates tags. Users should not need to install this directly; instead,
1966 install an implementation package such as asdf-astropy.")
1967 (license license:bsd-3)))
1969 (define-public python-asdf-astropy
1971 (name "python-asdf-astropy")
1976 (uri (pypi-uri "asdf_astropy" version))
1978 (base32 "0bzgah7gskvnz6jcrzipvzixv8k2jzjkskqwxngzwp4nxgjbcvi4"))))
1979 (build-system python-build-system)
1982 (modify-phases %standard-phases
1984 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1986 (add-installed-pythonpath inputs outputs)
1987 (invoke "python" "-m" "pytest")))))))
1989 (list python-coverage
1993 python-pytest-astropy
1995 python-semantic-version
1996 python-setuptools-scm))
1999 python-asdf-coordinates-schemas
2000 python-asdf-transform-schemas
2004 (home-page "https://github.com/astropy/asdf-astropy")
2005 (synopsis "ASDF serialization support for astropy")
2007 "This package includes plugins that provide ASDF serialization support for
2009 (license license:bsd-3)))
2011 (define python-asdf-wcs-schemas
2013 (name "python-asdf-wcs-schemas")
2018 (uri (pypi-uri "asdf_wcs_schemas" version))
2020 (base32 "0khyab9mnf2lv755as8kwhk3lqqpd3f4291ny3b9yp3ik86fzhz1"))))
2021 (build-system python-build-system)
2024 (modify-phases %standard-phases
2026 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2028 (add-installed-pythonpath inputs outputs)
2029 (invoke "python" "-m" "pytest")))))))
2032 python-setuptools-scm
2033 python-semantic-version))
2036 (home-page "https://github.com/asdf-format/asdf-wcs-schemas")
2037 (synopsis "ASDF WCS Schemas")
2039 "This package provides ASDF schemas for validating World Coordinate
2040 System (WCS) tags. Users should not need to install this directly; instead,
2041 install an implementation package such as gwcs.")
2042 (license license:bsd-3)))
2044 (define-public python-gwcs
2046 (name "python-gwcs")
2051 (uri (pypi-uri "gwcs" version))
2053 (base32 "194j49m8xjjzv9pp8cnj06igz8sdxb0nphyybcc7mhigw0f0kr30"))))
2054 (build-system python-build-system)
2057 (modify-phases %standard-phases
2059 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2061 (add-installed-pythonpath inputs outputs)
2062 (invoke "python" "-m" "pytest")))))))
2064 (list python-jsonschema
2067 python-pytest-doctestplus
2069 python-semantic-version
2070 python-setuptools-scm))
2074 python-asdf-wcs-schemas
2078 (home-page "https://gwcs.readthedocs.io/en/latest/")
2079 (synopsis "Generalized World Coordinate System")
2080 (description "Generalized World Coordinate System (GWCS) is an Astropy
2081 affiliated package providing tools for managing the World Coordinate System of
2084 GWCS takes a general approach to the problem of expressing transformations
2085 between pixel and world coordinates. It supports a data model which includes
2086 the entire transformation pipeline from input coordinates (detector by
2087 default) to world coordinates.")
2088 (license license:bsd-3)))
2090 (define-public python-astroalign
2092 (name "python-astroalign")
2097 (uri (pypi-uri "astroalign" version))
2099 (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
2100 (build-system python-build-system)
2102 ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
2105 `(("numpy" ,python-numpy)
2106 ("scikit-image" ,python-scikit-image)
2107 ("scipy" ,python-scipy)
2108 ("sep" ,python-sep)))
2109 (home-page "https://astroalign.readthedocs.io/")
2110 (synopsis "Astrometric Alignment of Images")
2112 "ASTROALIGN is a python module that will try to align two stellar
2113 astronomical images, especially when there is no WCS information available.")
2114 (license license:expat)))
2116 (define-public python-skyfield
2118 (name "python-skyfield")
2123 (uri (pypi-uri "skyfield" version))
2125 (base32 "1qh3k7g9dm6idppk87hnwxpx9a22xx98vav0zk31p6291drak3as"))))
2126 (build-system python-build-system)
2128 ;; NOTE: (Sharlatan-20210207T163305+0000): tests depend on custom test
2129 ;; framework https://github.com/brandon-rhodes/assay
2132 (list python-certifi python-jplephem python-numpy python-sgp4))
2133 (home-page "https://rhodesmill.org/skyfield/")
2134 (synopsis "Astronomy for Python")
2136 "Skyfield computes positions for the stars, planets, and satellites in
2137 orbit around the Earth.")
2138 (license license:expat)))