1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018, 2019, 2020, 2021 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 Guillaume Le Vaillant <glv@posteo.net>
8 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages astronomy)
26 #:use-module (guix packages)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix utils)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages algebra)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages fontutils)
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages libusb)
45 #:use-module (gnu packages lua)
46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages netpbm)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages pretty-print)
51 #:use-module (gnu packages python-check)
52 #:use-module (gnu packages python-crypto)
53 #:use-module (gnu packages python-science)
54 #:use-module (gnu packages python-xyz)
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages version-control)
57 #:use-module (gnu packages video)
58 #:use-module (gnu packages xiph)
59 #:use-module (gnu packages xorg)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system gnu)
62 #:use-module (guix build-system python)
63 #:use-module (ice-9 match)
64 #:use-module (srfi srfi-1))
66 (define-public cfitsio
74 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
75 "cfitsio-" version ".tar.gz"))
77 (base32 "1cyl1qksnkl3cq1fzl4dmjvkd6329b57y9iqyv44wjakbh6s4rav"))))
78 (build-system gnu-build-system)
79 ;; XXX Building with curl currently breaks wcslib. It doesn't use
80 ;; pkg-config and hence won't link with -lcurl.
82 `(#:tests? #f ; no tests
84 (modify-phases %standard-phases
85 (add-after 'unpack 'patch-paths
87 (substitute* "Makefile.in" (("/bin/") ""))
89 (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
90 (synopsis "Library for reading and writing FITS files")
91 (description "CFITSIO provides simple high-level routines for reading and
92 writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
93 programmer from the internal complexities of the FITS format. CFITSIO also
94 provides many advanced features for manipulating and filtering the information
96 (license (license:non-copyleft "file://License.txt"
97 "See License.txt in the distribution."))))
107 (string-append "ftp://ftp.eso.org/pub/qfits/qfits-" version ".tar.gz"))
109 (base32 "0m2b21mim3a7wgfg3ph2w5hv7mdvr03jmmhzipc0wcahijglcw9j"))))
110 (build-system gnu-build-system)
111 (home-page "https://www.eso.org/sci/software/eclipse/qfits/")
112 (synopsis "C library offering access to astronomical FITS files")
114 "@code{qfits} is a C library giving access to FITS file internals, both
115 for reading and writing.")
116 (license license:gpl2+)))
126 (url "https://github.com/liberfa/erfa")
127 (commit (string-append "v" version))))
128 (file-name (git-file-name name version))
130 (base32 "0nh12dr7gk4ki55lz95pkm4fpf7kazirra3zax9pab6v4qql4hlw"))))
131 (build-system gnu-build-system)
133 `(("automake" ,automake)
134 ("autoreconf" ,autoconf)
136 ("pkg-config" ,pkg-config)))
137 (home-page "https://github.com/liberfa/erfa")
138 (synopsis "Essential Routines for Fundamental Astronomy")
140 "The @acronym{ERFA, Essential Routines for Fundamental Astronomy} C library
141 contains key algorithms for astronomy, and is based on the @acronym{SOFA,
142 Standards of Fundamental Astronomy} library published by the @acronym{IAU,
143 International Astronomical Union}.")
144 (license license:bsd-3)))
153 (uri (string-append "https://www.astromatic.net/download/eye/"
154 "eye-" version ".tar.gz"))
156 (base32 "092qhzcbrkcfidbx4bv9wz42w297n80jk7a6kwyi9a3fjfz81d7k"))))
157 (build-system gnu-build-system)
158 (home-page "https://www.astromatic.net/software/eye")
159 (synopsis "Small image feature detector using machine learning")
161 "In EyE (Enhance Your Extraction) an artificial neural network connected to
162 pixels of a moving window (retina) is trained to associate these input stimuli
163 to the corresponding response in one or several output image(s). The resulting
164 filter can be loaded in SExtractor to operate complex, wildly non-linear filters
165 on astronomical images. Typical applications of EyE include adaptive filtering,
166 feature detection and cosmetic corrections.")
167 (license license:cecill)))
169 (define-public wcslib
177 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
180 (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
182 `(("cfitsio" ,cfitsio)))
183 (build-system gnu-build-system)
186 (list (string-append "--with-cfitsiolib="
187 (assoc-ref %build-inputs "cfitsio") "/lib")
188 (string-append "--with-cfitsioinc="
189 (assoc-ref %build-inputs "cfitsio") "/include"))
191 (modify-phases %standard-phases
192 (add-before 'configure 'patch-/bin/sh
194 (substitute* "makedefs.in"
197 (delete 'install-license-files)) ; installed by ‘make install’
198 ;; Parallel execution of the test suite is not supported.
199 #:parallel-tests? #f))
200 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
201 (synopsis "Library which implements the FITS WCS standard")
202 (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
203 defines keywords and usage that provide for the description of astronomical
204 coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
206 (license license:lgpl3+)))
208 (define-public weightwatcher
210 (name "weightwatcher")
215 (uri (string-append "https://www.astromatic.net/download/weightwatcher/"
216 "weightwatcher-" version ".tar.gz"))
218 (base32 "1zaqd8d9rpgcwjsp92q3lkfaa22i20gppb91dz34ym54swisjc2p"))))
219 (build-system gnu-build-system)
220 (home-page "https://www.astromatic.net/software/weightwatcher")
221 (synopsis "Weight-map/flag-map multiplexer and rasteriser")
223 "Weightwatcher is a program hat combines weight-maps, flag-maps and
224 polygon data in order to produce control maps which can directly be used in
225 astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
226 (license license:gpl3+)))
228 (define-public gnuastro
235 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
239 "1xp6n42qxv0x6yigi2w2l5k8006smv27lhrcssysgsvzbydghzg5"))))
240 (build-system gnu-build-system)
242 '(#:configure-flags '("--disable-static")))
244 `(("cfitsio" ,cfitsio)
245 ("curl" ,curl-minimal)
248 ("libjpeg" ,libjpeg-turbo)
253 `(("libtool" ,libtool)
255 (home-page "https://www.gnu.org/software/gnuastro/")
256 (synopsis "Astronomy utilities")
257 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
258 programs for the manipulation and analysis of astronomical data.")
259 (license license:gpl3+)))
261 (define-public sextractor
269 (url "https://github.com/astromatic/sextractor")
271 (file-name (git-file-name name version))
273 (base32 "0q69n3nyal57h3ik2xirwzrxzljrwy9ivwraxzv9566vi3n4z5mw"))))
274 (build-system gnu-build-system)
275 ;; NOTE: (Sharlatan-20210124T103117+0000): Building with `atlas' is failing
276 ;; due to missing shared library which required on configure phase. Switch
277 ;; build to use `openblas' instead. It requires FFTW with single precision
284 "--with-openblas-libdir=" (assoc-ref %build-inputs "openblas") "/lib")
286 "--with-openblas-incdir=" (assoc-ref %build-inputs "openblas") "/include")
288 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
290 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
292 `(("autoconf" ,autoconf)
293 ("automake" ,automake)
294 ("libtool" ,libtool)))
296 `(("openblas" ,openblas)
298 (home-page "http://www.astromatic.net/software/sextractor")
299 (synopsis "Extract catalogs of sources from astronomical images")
301 "SExtractor is a program that builds a catalogue of objects from an
302 astronomical image. Although it is particularly oriented towards reduction of
303 large scale galaxy-survey data, it can perform reasonably well on moderately
304 crowded star fields.")
305 (license license:gpl3+)))
307 (define-public skymaker
314 (uri (string-append "https://www.astromatic.net/download/skymaker/"
315 "skymaker-" version ".tar.gz"))
317 (base32 "03zvx7c89plp9559niqv5532r233kza3ir992rg3nxjksqmrqvx1"))))
318 (build-system gnu-build-system)
323 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
325 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
328 (home-page "https://www.astromatic.net/software/skymaker")
329 (synopsis "Astronomical image simulator")
331 "SkyMaker is a program that simulates astronomical images. It accepts
332 object lists in ASCII generated by the Stuff program to produce realistic
333 astronomical fields. SkyMaker is part of the EFIGI
334 (@url{https://www.astromatic.net/projects/efigi}) development project.")
335 (license license:gpl3+)))
337 (define-public stackistry
345 (url "https://github.com/GreatAttractor/stackistry")
346 (commit (string-append "v" version))))
347 (file-name (git-file-name name version))
349 (base32 "0rz29v33n0x0k40hv3v79ym5ylch1v0pbph4i21809gz2al5p7dq"))))
350 (build-system gnu-build-system)
355 "SKRY_INCLUDE_PATH=" (assoc-ref %build-inputs "libskry") "/include")
357 "SKRY_LIB_PATH=-L" (assoc-ref %build-inputs "libskry") "/lib")
359 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
361 (modify-phases %standard-phases
362 ;; no configure and tests are provided
365 (add-after 'unpack 'fix-paths
366 (lambda* (#:key outputs #:allow-other-keys)
367 (substitute* "src/main.cpp"
368 (("\"\\.\\.\", \"lang\"")
369 "\"../share/stackistry\", \"lang\""))
370 (substitute* "src/utils.cpp"
371 (("\"\\.\\.\", \"icons\"")
372 "\"../share/stackistry\", \"icons\""))
375 ;; The Makefile lacks an ‘install’ target.
376 (lambda* (#:key outputs #:allow-other-keys)
377 (let* ((out (assoc-ref outputs "out"))
378 (bin (string-append out "/bin"))
379 (icons (string-append out "/share/stackistry/icons"))
380 (lang (string-append out "/share/stackistry/lang")))
381 (copy-recursively "bin" bin)
382 (copy-recursively "icons" icons)
383 (copy-recursively "lang" lang))
386 `(("pkg-config" ,pkg-config)))
391 (home-page "https://github.com/GreatAttractor/stackistry")
392 (synopsis "Astronomical lucky imaging/image stacking tool")
394 "Stackistry implements the lucky imaging principle of astronomical
395 imaging: creating a high-quality still image out of a series of many (possibly
396 thousands) low quality ones (blurred, deformed, noisy). The resulting image
397 stack typically requires post-processing, including sharpening (e.g. via
398 deconvolution). Such post-processing is not performed by Stackistry.")
399 (license license:gpl3+)))
401 (define-public stellarium
408 (uri (string-append "https://github.com/Stellarium/stellarium"
409 "/releases/download/v" version
410 "/stellarium-" version ".tar.gz"))
412 (base32 "04vg2asj9gygwnrs32scqc8192ln2lyqa9v7cjqk8zd4frkwszwp"))))
413 (build-system cmake-build-system)
416 ("qtlocation" ,qtlocation)
417 ("qtmultimedia" ,qtmultimedia)
418 ("qtscript" ,qtscript)
419 ("qtserialport" ,qtserialport)
422 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
423 ("perl" ,perl) ; for pod2man
424 ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
425 ("qttools" ,qttools)))
427 `(#:test-target "test"
428 #:configure-flags (list "-DENABLE_TESTING=1"
430 "-DCMAKE_CXX_FLAGS=-isystem "
431 (assoc-ref %build-inputs "qtserialport")
433 #:phases (modify-phases %standard-phases
434 (add-before 'check 'set-offscreen-display
436 ;; Make Qt render "offscreen", required for tests.
437 (setenv "QT_QPA_PLATFORM" "offscreen")
438 (setenv "HOME" "/tmp")
440 (home-page "https://stellarium.org/")
441 (synopsis "3D sky viewer")
442 (description "Stellarium is a planetarium. It shows a realistic sky in
443 3D, just like what you see with the naked eye, binoculars, or a telescope. It
444 can be used to control telescopes over a serial port for tracking celestial
446 (license license:gpl2+)))
455 (uri (string-append "https://www.astromatic.net/download/stuff/"
456 "stuff-" version ".tar.gz"))
458 (base32 "1syibi3b86z9pikhicvkkmgxm916j732fdiw0agw0lq6z13fdcjm"))))
459 (build-system gnu-build-system)
460 (home-page "https://www.astromatic.net/software/stuff")
461 (synopsis "Astronomical catalogue simulation")
463 "Stuff is a program that simulates \"perfect\" astronomical catalogues.
464 It generates object lists in ASCII which can read by the SkyMaker program to
465 produce realistic astronomical fields. Stuff is part of the EFIGI development
467 (license license:gpl3+)))
476 (uri (string-append "https://www.astromatic.net/download/swarp/"
477 "swarp-" version ".tar.gz"))
479 (base32 "1i670waqp54vin1cn08mqckcggm9zqd69nk7yya2vvqpdizn6jpm"))))
480 (build-system gnu-build-system)
481 (home-page "https://www.astromatic.net/software/swarp")
482 (synopsis "FITS image resampling and co-addition")
484 "SWarp is a program that resamples and co-adds together FITS images using
485 any arbitrary astrometric projection defined in the WCS standard.")
486 (license license:gpl3+)))
488 (define-public celestia
489 (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce"))
492 (version (git-version "1.6.1" "815" commit))
496 (url "https://github.com/celestiaproject/celestia")
498 (file-name (git-file-name name version))
501 "00xibg87l1arzifakgj7s828x9pszcgx7x7ij88a561ig49ryh78"))))
502 (build-system cmake-build-system)
506 ("pkg-config" ,pkg-config)
508 ("gettext" ,gettext-minimal)))
512 ("libtheora" ,libtheora)
513 ("libjpeg" ,libjpeg-turbo)
517 ;; optional: fmtlib, Eigen3;
520 ;; glut: for glut interface
521 ("freeglut" ,freeglut)))
525 `(#:configure-flags '("-DENABLE_GLUT=ON" "-DENABLE_QT=OFF")
526 #:tests? #f)) ;no tests
527 (home-page "https://celestia.space/")
528 (synopsis "Real-time 3D visualization of space")
530 "This simulation program lets you explore our universe in three
531 dimensions. Celestia simulates many different types of celestial objects.
532 From planets and moons to star clusters and galaxies, you can visit every
533 object in the expandable database and view it from any point in space and
534 time. The position and movement of solar system objects is calculated
535 accurately in real time at any rate desired.")
536 (license license:gpl2+))))
538 (define-public celestia-gtk
541 (name "celestia-gtk")
543 (append (alist-delete "freeglut" (package-inputs celestia))
545 ("gtkglext" ,gtkglext))))
547 `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
550 (define-public libnova
558 (url "https://git.code.sf.net/p/libnova/libnova.git")
559 (commit (string-append "v" version))))
560 (file-name (git-file-name name version))
563 "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b"))))
564 (build-system gnu-build-system)
567 (modify-phases %standard-phases
568 (add-after 'unpack 'patch-git-version
570 (substitute* "./git-version-gen"
571 (("/bin/sh") (which "sh")))
574 `(("autoconf" ,autoconf)
575 ("automake" ,automake)
576 ("libtool" ,libtool)))
577 (synopsis "Celestial mechanics, astrometry and astrodynamics library")
578 (description "Libnova is a general purpose, double precision, Celestial
579 Mechanics, Astrometry and Astrodynamics library.")
580 (home-page "http://libnova.sourceforge.net/")
581 (license (list license:lgpl2.0+
582 license:gpl2+)))) ; examples/transforms.c & lntest/*.c
584 (define-public libskry
592 (url "https://github.com/GreatAttractor/libskry")
593 (commit (string-append "v" version))))
594 (file-name (git-file-name name version))
596 (base32 "14kwng0j8wqzlb0gqg3ayq36l15dpz7kvxc56fa47j55b376bwh6"))))
597 (build-system gnu-build-system)
602 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
604 (modify-phases %standard-phases
605 (delete 'configure) ;; no configure provided
606 (delete 'check) ;; no tests provided
608 ;; The Makefile lacks an ‘install’ target.
609 (lambda* (#:key outputs #:allow-other-keys)
610 (let* ((out (assoc-ref outputs "out"))
611 (lib (string-append out "/lib"))
612 (include (string-append out "/include")))
613 (copy-recursively "bin" lib)
614 (copy-recursively "include" include))
617 `(("ffmpeg" ,ffmpeg)))
618 (home-page "https://github.com/GreatAttractor/libskry")
619 (synopsis "Astronimical lucky imaging library")
621 "@code{libskry} implements the lucky imaging principle of astronomical
622 imaging: creating a high-quality still image out of a series of many thousands)
624 (license license:gpl3+)))
626 (define-public libpasastro
627 ;; NOTE: (Sharlatan-20210122T215921+0000): the version tag has a build
628 ;; error on spice which is resolved with the latest commit.
629 (let ((commit "e3c218d1502a18cae858c83a9a8812ab197fcb60")
633 (version (git-version "1.4.0" revision commit))
637 (url "https://github.com/pchev/libpasastro")
639 (file-name (git-file-name name version))
642 "0asp2sn34nds5va2ghppwc41vb6j3d1mf049j949rgrll817kx47"))))
643 (build-system gnu-build-system)
648 ,(match (or (%current-target-system) (%current-system))
649 ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
652 ,(match (or (%current-target-system) (%current-system))
653 ("i686-linux" "CPU_TARGET=i386")
654 ("x86_64-linux" "CPU_TARGET=x86_64")
655 ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
657 (string-append "PREFIX=" (assoc-ref %outputs "out")))
659 (modify-phases %standard-phases
660 (delete 'configure))))
661 (home-page "https://github.com/pchev/libpasastro")
662 (synopsis "Interface to astronomy library for use from Pascal program")
664 "This package provides shared libraries to interface Pascal program with
665 standard astronomy libraries:
668 @item @code{libpasgetdss.so}: Interface with GetDSS to work with DSS images.
669 @item @code{libpasplan404.so}: Interface with Plan404 to compute planets position.
670 @item @code{libpaswcs.so}: Interface with libwcs to work with FITS WCS.
671 @item @code{libpasspice.so}: To work with NAIF/SPICE kernel.
673 (license license:gpl2+))))
675 (define-public missfits
682 (uri (string-append "https://www.astromatic.net/download/missfits/"
683 "missfits-" version ".tar.gz"))
685 (base32 "04jrd7fsvzr14vdmwgj2f6v97gdcfyjyz6jppml3ghr9xh12jxv5"))))
686 (build-system gnu-build-system)
687 (home-page "https://www.astromatic.net/software/missfits")
688 (synopsis "FITS files Maintenance program")
690 "MissFITS is a program that performs basic maintenance and packaging tasks
694 @item add/edit FITS header keywords
695 @item split/join Multi-Extension-FITS (MEF) files
696 @item unpack/pack FITS data-cubes
697 @item create/check/update FITS checksums, using R. Seaman's protocol
698 (see http://www.adass.org/adass/proceedings/adass94/seamanr.html)
700 (license license:gpl3+)))
702 (define-public xplanet
711 "mirror://sourceforge/xplanet/xplanet/"
712 version "/xplanet-" version ".tar.gz"))
714 (base32 "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023"))
717 "xplanet-1.3.1-cxx11-eof.patch"
718 "xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch"
719 "xplanet-1.3.1-libimage_gif.c.patch"
720 "xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch"))))
721 (build-system gnu-build-system)
723 `(("pkg-config" ,pkg-config)))
726 ("libxscrnsaver" ,libxscrnsaver)
728 ("freetype" ,freetype)
731 ("libjpeg" ,libjpeg-turbo)
738 (let ((netpbm (assoc-ref %build-inputs "netpbm")))
740 ;; Give correct path for pnm.h header to configure script
741 (string-append "CPPFLAGS=-I" netpbm "/include/netpbm")
742 ;; no nasa jpl cspice support
743 "--without-cspice" )))))
744 (home-page "http://xplanet.sourceforge.net/")
745 (synopsis "Planetary body renderer")
747 "Xplanet renders an image of a planet into an X window or file.
748 All of the major planets and most satellites can be drawn and different map
749 projections are also supported, including azimuthal, hemisphere, Lambert,
750 Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
751 (license license:gpl2+)))
753 (define-public gpredict
760 (uri (string-append "https://github.com/csete/gpredict/releases"
761 "/download/v" version
762 "/gpredict-" version ".tar.bz2"))
764 (base32 "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"))))
765 (build-system gnu-build-system)
767 `(("intltool" ,intltool)
768 ("gettext" ,gettext-minimal)
769 ("pkg-config" ,pkg-config)))
773 ("goocanvas" ,goocanvas)
777 (modify-phases %standard-phases
778 (add-after 'unpack 'fix-tests
780 ;; Remove reference to non-existent file.
781 (substitute* "po/POTFILES.in"
782 (("src/gtk-sat-tree\\.c")
785 (synopsis "Satellite tracking and orbit prediction application")
787 "Gpredict is a real-time satellite tracking and orbit prediction
788 application. It can track a large number of satellites and display their
789 position and other data in lists, tables, maps, and polar plots (radar view).
790 Gpredict can also predict the time of future passes for a satellite, and
791 provide you with detailed information about each pass.")
792 (home-page "http://gpredict.oz9aec.net/index.php")
793 (license license:gpl2+)))
803 (url "https://github.com/indilib/indi")
804 (commit (string-append "v" version))))
805 (file-name (git-file-name name version))
807 (base32 "0nw4b2cdsg244slcm3yf1v11jlxbbjrpvi6ax90svs7rlandz8jv"))))
808 (build-system cmake-build-system)
811 (let ((out (assoc-ref %outputs "out")))
813 "-DINDI_BUILD_UNITTESTS=ON"
814 "-DCMAKE_BUILD_TYPE=Release"
815 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
816 (string-append "-DUDEVRULES_INSTALL_DIR=" out "/lib/udev/rules.d")))
818 (modify-phases %standard-phases
825 (add-before 'install 'set-install-directories
826 (lambda* (#:key outputs #:allow-other-keys)
827 (let ((out (assoc-ref outputs "out")))
828 (mkdir-p (string-append out "/lib/udev/rules.d")))
831 `(("googletest" ,googletest)))
833 `(("cfitsio" ,cfitsio)
837 ("libjpeg-turbo" ,libjpeg-turbo)
842 (home-page "https://www.indilib.org")
843 (synopsis "Library for astronimical intrumentation control")
845 "INDI (Instrument-Neutral Device Interface) is a distributed XML-based
846 control protocol designed to operate astronomical instrumentation. INDI is
847 small, flexible, easy to parse, scalable, and stateless. It supports common
848 DCS functions such as remote control, data acquisition, monitoring, and a lot
850 (license (list license:bsd-3
855 (define-public python-jplephem
857 (name "python-jplephem")
862 (uri (pypi-uri "jplephem" version))
864 (base32 "1ca3dswsslij79qg6dcijjz4l0fj6nzmxld8z93v45ahlkhps0g0"))))
865 (build-system python-build-system)
868 (modify-phases %standard-phases
870 (lambda* (#:key outputs #:allow-other-keys)
871 (let ((out (assoc-ref outputs "out")))
873 (string-append "./build/lib:"
874 (getenv "PYTHONPATH")))
875 (setenv "PATH" (string-append out "/bin:"
877 (invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
879 `(("python-numpy" ,python-numpy)))
880 (home-page "https://github.com/brandon-rhodes/python-jplephem")
881 (synopsis "Python version of NASA DE4xx ephemerides")
883 "The package is a Python implementation of the mathematics that standard
884 JPL ephemerides use to predict raw (x,y,z) planetary positions.")
885 (license license:expat)))
887 (define-public python-pyerfa
889 (name "python-pyerfa")
894 (uri (pypi-uri "pyerfa" version))
896 (base32 "1s78mdyrxha2jcckfs0wg5ynkf0pwh1bw9mmh99vprinxh9n4xri"))
897 (modules '((guix build utils)))
900 ;; Remove bundled submodule library.
901 (delete-file-recursively "liberfa")
903 (build-system python-build-system)
906 (modify-phases %standard-phases
907 (add-before 'build 'use-system-liberfa
909 (setenv "PYERFA_USE_SYSTEM_LIBERFA" "1")
912 `(("pytest" ,python-pytest)
913 ("setuptools-scm" ,python-setuptools-scm)
914 ("pytest-doctestplus" ,python-pytest-doctestplus)))
917 ("numpy" ,python-numpy)))
918 (home-page "https://github.com/liberfa/pyerfa")
919 (synopsis "Python bindings for ERFA")
921 "PyERFA is the Python wrapper for the ERFA library (Essential
922 Routines for Fundamental Astronomy), a C library containing key algorithms for
923 astronomy, which is based on the SOFA library published by the International
924 Astronomical Union (IAU). All C routines are wrapped as Numpy universal
925 functions, so that they can be called with scalar or array inputs.")
926 (license license:bsd-3)))
928 (define-public python-sep
935 (uri (pypi-uri "sep" version))
937 (base32 "0wxdqn92q1grv8k7xi7h88ac6wnznw4xh5bdlz1vz6za2dgsyj4m"))))
938 (build-system python-build-system)
940 `(("cython" ,python-cython)
941 ("pytest" ,python-pytest)))
943 `(("numpy" ,python-numpy)))
944 (home-page "https://github.com/kbarbary/sep")
945 (synopsis "Astronomical source extraction and photometry library")
947 "SEP makes the core algorithms of Source Extractor available as a library
948 of stand-alone functions and classes.")
949 (license (list license:bsd-3
953 (define-public python-asdf
960 (uri (pypi-uri "asdf" version))
962 (base32 "1y47zhkd90i8wmm2i35amfl0rvjqlb3fcx90xp7n9kr2z0byzyzg"))))
963 (build-system python-build-system)
965 ;; TODO: (Sharlatan-20210207T165820+0000): Tests depend on astropy, astropy
966 ;; depends on asdf. Disable circular dependence.
969 `(("packaging" ,python-packaging)
970 ("semantic-version" ,python-semantic-version)
971 ("setuptools-scm" ,python-setuptools-scm)))
973 `(("importlib-resources" ,python-importlib-resources)
974 ("jsonschema" ,python-jsonschema)
975 ("numpy" ,python-numpy)
976 ("pyyaml" ,python-pyyaml)))
977 (home-page "https://github.com/asdf-format/asdf")
978 (synopsis "Python tools to handle ASDF files")
980 "The Advanced Scientific Data Format (ASDF) is a next-generation
981 interchange format for scientific data. This package contains the Python
982 implementation of the ASDF Standard.")
983 (license license:bsd-3)))
985 (define-public python-astroalign
987 (name "python-astroalign")
992 (uri (pypi-uri "astroalign" version))
994 (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
995 (build-system python-build-system)
997 ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
1000 `(("numpy" ,python-numpy)
1001 ("scikit-image" ,python-scikit-image)
1002 ("scipy" ,python-scipy)
1003 ("sep" ,python-sep)))
1004 (home-page "https://astroalign.readthedocs.io/")
1005 (synopsis "Astrometric Alignment of Images")
1007 "ASTROALIGN is a python module that will try to align two stellar
1008 astronomical images, especially when there is no WCS information available.")
1009 (license license:expat)))
1011 (define-public python-skyfield
1013 (name "python-skyfield")
1018 (uri (pypi-uri "skyfield" version))
1020 (base32 "1qi1l8qn6irdv6w41qq30s2yjwak7h6ayywr1pry9gwcm2c25bv5"))))
1021 (build-system python-build-system)
1023 ;; NOTE: (Sharlatan-20210207T163305+0000): tests depend on custom test
1024 ;; framework https://github.com/brandon-rhodes/assay
1027 `(("certifi" ,python-certifi)
1028 ("jplephem" ,python-jplephem)
1029 ("numpy" ,python-numpy)
1030 ("sgp4" ,python-sgp4)))
1031 (home-page "https://rhodesmill.org/skyfield/")
1032 (synopsis "Astronomy for Python")
1034 "Skyfield computes positions for the stars, planets, and satellites in
1035 orbit around the Earth.")
1036 (license license:expat)))