gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / astronomy.scm
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>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
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.
16 ;;;
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.
21 ;;;
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/>.
24
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))
65
66 (define-public cfitsio
67 (package
68 (name "cfitsio")
69 (version "3.49")
70 (source
71 (origin
72 (method url-fetch)
73 (uri (string-append
74 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
75 "cfitsio-" version ".tar.gz"))
76 (sha256
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.
81 (arguments
82 `(#:tests? #f ; no tests
83 #:phases
84 (modify-phases %standard-phases
85 (add-after 'unpack 'patch-paths
86 (lambda _
87 (substitute* "Makefile.in" (("/bin/") ""))
88 #t)))))
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
95 in FITS files.")
96 (license (license:non-copyleft "file://License.txt"
97 "See License.txt in the distribution."))))
98
99 (define-public qfits
100 (package
101 (name "qfits")
102 (version "6.2.0")
103 (source
104 (origin
105 (method url-fetch)
106 (uri
107 (string-append "ftp://ftp.eso.org/pub/qfits/qfits-" version ".tar.gz"))
108 (sha256
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")
113 (description
114 "@code{qfits} is a C library giving access to FITS file internals, both
115 for reading and writing.")
116 (license license:gpl2+)))
117
118 (define-public erfa
119 (package
120 (name "erfa")
121 (version "1.7.3")
122 (source
123 (origin
124 (method git-fetch)
125 (uri (git-reference
126 (url "https://github.com/liberfa/erfa")
127 (commit (string-append "v" version))))
128 (file-name (git-file-name name version))
129 (sha256
130 (base32 "0nh12dr7gk4ki55lz95pkm4fpf7kazirra3zax9pab6v4qql4hlw"))))
131 (build-system gnu-build-system)
132 (native-inputs
133 `(("automake" ,automake)
134 ("autoreconf" ,autoconf)
135 ("libtool" ,libtool)
136 ("pkg-config" ,pkg-config)))
137 (home-page "https://github.com/liberfa/erfa")
138 (synopsis "Essential Routines for Fundamental Astronomy")
139 (description
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)))
145
146 (define-public eye
147 (package
148 (name "eye")
149 (version "1.4.1")
150 (source
151 (origin
152 (method url-fetch)
153 (uri (string-append "https://www.astromatic.net/download/eye/"
154 "eye-" version ".tar.gz"))
155 (sha256
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")
160 (description
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)))
168
169 (define-public wcslib
170 (package
171 (name "wcslib")
172 (version "7.5")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (string-append
177 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
178 ".tar.bz2"))
179 (sha256
180 (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
181 (inputs
182 `(("cfitsio" ,cfitsio)))
183 (build-system gnu-build-system)
184 (arguments
185 `(#:configure-flags
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"))
190 #:phases
191 (modify-phases %standard-phases
192 (add-before 'configure 'patch-/bin/sh
193 (lambda _
194 (substitute* "makedefs.in"
195 (("/bin/sh") "sh"))
196 #t))
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
205 header.")
206 (license license:lgpl3+)))
207
208 (define-public weightwatcher
209 (package
210 (name "weightwatcher")
211 (version "1.12")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (string-append "https://www.astromatic.net/download/weightwatcher/"
216 "weightwatcher-" version ".tar.gz"))
217 (sha256
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")
222 (description
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+)))
227
228 (define-public gnuastro
229 (package
230 (name "gnuastro")
231 (version "0.14")
232 (source
233 (origin
234 (method url-fetch)
235 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
236 version ".tar.lz"))
237 (sha256
238 (base32
239 "1xp6n42qxv0x6yigi2w2l5k8006smv27lhrcssysgsvzbydghzg5"))))
240 (build-system gnu-build-system)
241 (arguments
242 '(#:configure-flags '("--disable-static")))
243 (inputs
244 `(("cfitsio" ,cfitsio)
245 ("curl" ,curl-minimal)
246 ("gsl" ,gsl)
247 ("libgit2" ,libgit2)
248 ("libjpeg" ,libjpeg-turbo)
249 ("libtiff" ,libtiff)
250 ("wcslib" ,wcslib)
251 ("zlib" ,zlib)))
252 (native-inputs
253 `(("libtool" ,libtool)
254 ("lzip" ,lzip)))
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+)))
260
261 (define-public sextractor
262 (package
263 (name "sextractor")
264 (version "2.25.0")
265 (source
266 (origin
267 (method git-fetch)
268 (uri (git-reference
269 (url "https://github.com/astromatic/sextractor")
270 (commit version)))
271 (file-name (git-file-name name version))
272 (sha256
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
278 ;; `fftwf'.
279 (arguments
280 `(#:configure-flags
281 (list
282 "--enable-openblas"
283 (string-append
284 "--with-openblas-libdir=" (assoc-ref %build-inputs "openblas") "/lib")
285 (string-append
286 "--with-openblas-incdir=" (assoc-ref %build-inputs "openblas") "/include")
287 (string-append
288 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
289 (string-append
290 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
291 (native-inputs
292 `(("autoconf" ,autoconf)
293 ("automake" ,automake)
294 ("libtool" ,libtool)))
295 (inputs
296 `(("openblas" ,openblas)
297 ("fftw" ,fftwf)))
298 (home-page "http://www.astromatic.net/software/sextractor")
299 (synopsis "Extract catalogs of sources from astronomical images")
300 (description
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+)))
306
307 (define-public skymaker
308 (package
309 (name "skymaker")
310 (version "3.10.5")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (string-append "https://www.astromatic.net/download/skymaker/"
315 "skymaker-" version ".tar.gz"))
316 (sha256
317 (base32 "03zvx7c89plp9559niqv5532r233kza3ir992rg3nxjksqmrqvx1"))))
318 (build-system gnu-build-system)
319 (arguments
320 `(#:configure-flags
321 (list
322 (string-append
323 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
324 (string-append
325 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
326 (inputs
327 `(("fftw" ,fftwf)))
328 (home-page "https://www.astromatic.net/software/skymaker")
329 (synopsis "Astronomical image simulator")
330 (description
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+)))
336
337 (define-public stackistry
338 (package
339 (name "stackistry")
340 (version "0.3.0")
341 (source
342 (origin
343 (method git-fetch)
344 (uri (git-reference
345 (url "https://github.com/GreatAttractor/stackistry")
346 (commit (string-append "v" version))))
347 (file-name (git-file-name name version))
348 (sha256
349 (base32 "0rz29v33n0x0k40hv3v79ym5ylch1v0pbph4i21809gz2al5p7dq"))))
350 (build-system gnu-build-system)
351 (arguments
352 `(#:make-flags
353 (list
354 (string-append
355 "SKRY_INCLUDE_PATH=" (assoc-ref %build-inputs "libskry") "/include")
356 (string-append
357 "SKRY_LIB_PATH=-L" (assoc-ref %build-inputs "libskry") "/lib")
358 (string-append
359 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
360 #:phases
361 (modify-phases %standard-phases
362 ;; no configure and tests are provided
363 (delete 'configure)
364 (delete 'check)
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\""))
373 #t))
374 (replace 'install
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))
384 #t)))))
385 (native-inputs
386 `(("pkg-config" ,pkg-config)))
387 (inputs
388 `(("gtkmm" ,gtkmm)
389 ("libskry" ,libskry)
390 ("ffmpeg" ,ffmpeg)))
391 (home-page "https://github.com/GreatAttractor/stackistry")
392 (synopsis "Astronomical lucky imaging/image stacking tool")
393 (description
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+)))
400
401 (define-public stellarium
402 (package
403 (name "stellarium")
404 (version "0.21.0")
405 (source
406 (origin
407 (method url-fetch)
408 (uri (string-append "https://github.com/Stellarium/stellarium"
409 "/releases/download/v" version
410 "/stellarium-" version ".tar.gz"))
411 (sha256
412 (base32 "04vg2asj9gygwnrs32scqc8192ln2lyqa9v7cjqk8zd4frkwszwp"))))
413 (build-system cmake-build-system)
414 (inputs
415 `(("qtbase" ,qtbase)
416 ("qtlocation" ,qtlocation)
417 ("qtmultimedia" ,qtmultimedia)
418 ("qtscript" ,qtscript)
419 ("qtserialport" ,qtserialport)
420 ("zlib" ,zlib)))
421 (native-inputs
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)))
426 (arguments
427 `(#:test-target "test"
428 #:configure-flags (list "-DENABLE_TESTING=1"
429 (string-append
430 "-DCMAKE_CXX_FLAGS=-isystem "
431 (assoc-ref %build-inputs "qtserialport")
432 "/include/qt5"))
433 #:phases (modify-phases %standard-phases
434 (add-before 'check 'set-offscreen-display
435 (lambda _
436 ;; Make Qt render "offscreen", required for tests.
437 (setenv "QT_QPA_PLATFORM" "offscreen")
438 (setenv "HOME" "/tmp")
439 #t)))))
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
445 objects.")
446 (license license:gpl2+)))
447
448 (define-public stuff
449 (package
450 (name "stuff")
451 (version "1.26.0")
452 (source
453 (origin
454 (method url-fetch)
455 (uri (string-append "https://www.astromatic.net/download/stuff/"
456 "stuff-" version ".tar.gz"))
457 (sha256
458 (base32 "1syibi3b86z9pikhicvkkmgxm916j732fdiw0agw0lq6z13fdcjm"))))
459 (build-system gnu-build-system)
460 (home-page "https://www.astromatic.net/software/stuff")
461 (synopsis "Astronomical catalogue simulation")
462 (description
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
466 project.")
467 (license license:gpl3+)))
468
469 (define-public swarp
470 (package
471 (name "swarp")
472 (version "2.38.0")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (string-append "https://www.astromatic.net/download/swarp/"
477 "swarp-" version ".tar.gz"))
478 (sha256
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")
483 (description
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+)))
487
488 (define-public celestia
489 (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce"))
490 (package
491 (name "celestia")
492 (version (git-version "1.6.1" "815" commit))
493 (source (origin
494 (method git-fetch)
495 (uri (git-reference
496 (url "https://github.com/celestiaproject/celestia")
497 (commit commit)))
498 (file-name (git-file-name name version))
499 (sha256
500 (base32
501 "00xibg87l1arzifakgj7s828x9pszcgx7x7ij88a561ig49ryh78"))))
502 (build-system cmake-build-system)
503 (native-inputs
504 `(("perl" ,perl)
505 ("libgit2" ,libgit2)
506 ("pkg-config" ,pkg-config)
507 ("libtool" ,libtool)
508 ("gettext" ,gettext-minimal)))
509 (inputs
510 `(("glu" ,glu)
511 ("glew" ,glew)
512 ("libtheora" ,libtheora)
513 ("libjpeg" ,libjpeg-turbo)
514 ("libpng" ,libpng)
515 ;; maybe required?
516 ("mesa" ,mesa)
517 ;; optional: fmtlib, Eigen3;
518 ("fmt" ,fmt)
519 ("eigen" ,eigen)
520 ;; glut: for glut interface
521 ("freeglut" ,freeglut)))
522 (propagated-inputs
523 `(("lua" ,lua)))
524 (arguments
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")
529 (description
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+))))
537
538 (define-public celestia-gtk
539 (package
540 (inherit celestia)
541 (name "celestia-gtk")
542 (inputs
543 (append (alist-delete "freeglut" (package-inputs celestia))
544 `(("gtk2" ,gtk+-2)
545 ("gtkglext" ,gtkglext))))
546 (arguments
547 `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
548 #:tests? #f))))
549
550 (define-public libnova
551 (package
552 (name "libnova")
553 (version "0.16")
554 (source
555 (origin
556 (method git-fetch)
557 (uri (git-reference
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))
561 (sha256
562 (base32
563 "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b"))))
564 (build-system gnu-build-system)
565 (arguments
566 `(#:phases
567 (modify-phases %standard-phases
568 (add-after 'unpack 'patch-git-version
569 (lambda _
570 (substitute* "./git-version-gen"
571 (("/bin/sh") (which "sh")))
572 #t)))))
573 (native-inputs
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
583
584 (define-public libskry
585 (package
586 (name "libskry")
587 (version "0.3.0")
588 (source
589 (origin
590 (method git-fetch)
591 (uri (git-reference
592 (url "https://github.com/GreatAttractor/libskry")
593 (commit (string-append "v" version))))
594 (file-name (git-file-name name version))
595 (sha256
596 (base32 "14kwng0j8wqzlb0gqg3ayq36l15dpz7kvxc56fa47j55b376bwh6"))))
597 (build-system gnu-build-system)
598 (arguments
599 `(#:make-flags
600 (list
601 (string-append
602 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
603 #:phases
604 (modify-phases %standard-phases
605 (delete 'configure) ;; no configure provided
606 (delete 'check) ;; no tests provided
607 (replace 'install
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))
615 #t)))))
616 (inputs
617 `(("ffmpeg" ,ffmpeg)))
618 (home-page "https://github.com/GreatAttractor/libskry")
619 (synopsis "Astronimical lucky imaging library")
620 (description
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)
623 low quality ones")
624 (license license:gpl3+)))
625
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")
630 (revision "1"))
631 (package
632 (name "libpasastro")
633 (version (git-version "1.4.0" revision commit))
634 (source (origin
635 (method git-fetch)
636 (uri (git-reference
637 (url "https://github.com/pchev/libpasastro")
638 (commit commit)))
639 (file-name (git-file-name name version))
640 (sha256
641 (base32
642 "0asp2sn34nds5va2ghppwc41vb6j3d1mf049j949rgrll817kx47"))))
643 (build-system gnu-build-system)
644 (arguments
645 `(#:tests? #f
646 #:make-flags
647 (list
648 ,(match (or (%current-target-system) (%current-system))
649 ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
650 "OS_TARGET=linux")
651 (_ #f))
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")
656 (_ #f))
657 (string-append "PREFIX=" (assoc-ref %outputs "out")))
658 #:phases
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")
663 (description
664 "This package provides shared libraries to interface Pascal program with
665 standard astronomy libraries:
666
667 @itemize
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.
672 @end itemize\n")
673 (license license:gpl2+))))
674
675 (define-public missfits
676 (package
677 (name "missfits")
678 (version "2.8.0")
679 (source
680 (origin
681 (method url-fetch)
682 (uri (string-append "https://www.astromatic.net/download/missfits/"
683 "missfits-" version ".tar.gz"))
684 (sha256
685 (base32 "04jrd7fsvzr14vdmwgj2f6v97gdcfyjyz6jppml3ghr9xh12jxv5"))))
686 (build-system gnu-build-system)
687 (home-page "https://www.astromatic.net/software/missfits")
688 (synopsis "FITS files Maintenance program")
689 (description
690 "MissFITS is a program that performs basic maintenance and packaging tasks
691 on FITS files:
692
693 @itemize
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)
699 @end itemize\n")
700 (license license:gpl3+)))
701
702 (define-public xplanet
703 (package
704 (name "xplanet")
705 (version "1.3.1")
706 (source
707 (origin
708 (method url-fetch)
709 (uri
710 (string-append
711 "mirror://sourceforge/xplanet/xplanet/"
712 version "/xplanet-" version ".tar.gz"))
713 (sha256
714 (base32 "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023"))
715 (patches
716 (search-patches
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)
722 (native-inputs
723 `(("pkg-config" ,pkg-config)))
724 (inputs
725 `(("libx11" ,libx11)
726 ("libxscrnsaver" ,libxscrnsaver)
727 ("libice" ,libice)
728 ("freetype" ,freetype)
729 ("pango" ,pango)
730 ("giflib" ,giflib)
731 ("libjpeg" ,libjpeg-turbo)
732 ("libpng" ,libpng)
733 ("libtiff" ,libtiff)
734 ("netpbm" ,netpbm)
735 ("zlib" ,zlib)))
736 (arguments
737 `(#:configure-flags
738 (let ((netpbm (assoc-ref %build-inputs "netpbm")))
739 (append (list
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")
746 (description
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+)))
752
753 (define-public gpredict
754 (package
755 (name "gpredict")
756 (version "2.2.1")
757 (source
758 (origin
759 (method url-fetch)
760 (uri (string-append "https://github.com/csete/gpredict/releases"
761 "/download/v" version
762 "/gpredict-" version ".tar.bz2"))
763 (sha256
764 (base32 "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"))))
765 (build-system gnu-build-system)
766 (native-inputs
767 `(("intltool" ,intltool)
768 ("gettext" ,gettext-minimal)
769 ("pkg-config" ,pkg-config)))
770 (inputs
771 `(("curl" ,curl)
772 ("glib" ,glib)
773 ("goocanvas" ,goocanvas)
774 ("gtk+" ,gtk+)))
775 (arguments
776 `(#:phases
777 (modify-phases %standard-phases
778 (add-after 'unpack 'fix-tests
779 (lambda _
780 ;; Remove reference to non-existent file.
781 (substitute* "po/POTFILES.in"
782 (("src/gtk-sat-tree\\.c")
783 ""))
784 #t)))))
785 (synopsis "Satellite tracking and orbit prediction application")
786 (description
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+)))
794
795 (define-public indi
796 (package
797 (name "indi")
798 (version "1.8.9")
799 (source
800 (origin
801 (method git-fetch)
802 (uri (git-reference
803 (url "https://github.com/indilib/indi")
804 (commit (string-append "v" version))))
805 (file-name (git-file-name name version))
806 (sha256
807 (base32 "0nw4b2cdsg244slcm3yf1v11jlxbbjrpvi6ax90svs7rlandz8jv"))))
808 (build-system cmake-build-system)
809 (arguments
810 `(#:configure-flags
811 (let ((out (assoc-ref %outputs "out")))
812 (list
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")))
817 #:phases
818 (modify-phases %standard-phases
819 (replace 'check
820 (lambda _
821 (chdir "test")
822 (invoke "ctest")
823 (chdir "..")
824 #t))
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")))
829 #t)))))
830 (native-inputs
831 `(("googletest" ,googletest)))
832 (inputs
833 `(("cfitsio" ,cfitsio)
834 ("curl" ,curl)
835 ("fftw" ,fftw)
836 ("gsl" ,gsl)
837 ("libjpeg-turbo" ,libjpeg-turbo)
838 ("libnova" ,libnova)
839 ("libtiff" ,libtiff)
840 ("libusb" ,libusb)
841 ("zlib" ,zlib)))
842 (home-page "https://www.indilib.org")
843 (synopsis "Library for astronimical intrumentation control")
844 (description
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
849 more.")
850 (license (list license:bsd-3
851 license:gpl2+
852 license:lgpl2.0+
853 license:lgpl2.1+))))
854
855 (define-public python-jplephem
856 (package
857 (name "python-jplephem")
858 (version "2.15")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (pypi-uri "jplephem" version))
863 (sha256
864 (base32 "1ca3dswsslij79qg6dcijjz4l0fj6nzmxld8z93v45ahlkhps0g0"))))
865 (build-system python-build-system)
866 (arguments
867 `(#:phases
868 (modify-phases %standard-phases
869 (replace 'check
870 (lambda* (#:key outputs #:allow-other-keys)
871 (let ((out (assoc-ref outputs "out")))
872 (setenv "PYTHONPATH"
873 (string-append "./build/lib:"
874 (getenv "PYTHONPATH")))
875 (setenv "PATH" (string-append out "/bin:"
876 (getenv "PATH")))
877 (invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
878 (inputs
879 `(("python-numpy" ,python-numpy)))
880 (home-page "https://github.com/brandon-rhodes/python-jplephem")
881 (synopsis "Python version of NASA DE4xx ephemerides")
882 (description
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)))
886
887 (define-public python-pyerfa
888 (package
889 (name "python-pyerfa")
890 (version "1.7.2")
891 (source
892 (origin
893 (method url-fetch)
894 (uri (pypi-uri "pyerfa" version))
895 (sha256
896 (base32 "1s78mdyrxha2jcckfs0wg5ynkf0pwh1bw9mmh99vprinxh9n4xri"))
897 (modules '((guix build utils)))
898 (snippet
899 '(begin
900 ;; Remove bundled submodule library.
901 (delete-file-recursively "liberfa")
902 #t))))
903 (build-system python-build-system)
904 (arguments
905 `(#:phases
906 (modify-phases %standard-phases
907 (add-before 'build 'use-system-liberfa
908 (lambda _
909 (setenv "PYERFA_USE_SYSTEM_LIBERFA" "1")
910 #t)))))
911 (native-inputs
912 `(("pytest" ,python-pytest)
913 ("setuptools-scm" ,python-setuptools-scm)
914 ("pytest-doctestplus" ,python-pytest-doctestplus)))
915 (inputs
916 `(("liberfa" ,erfa)
917 ("numpy" ,python-numpy)))
918 (home-page "https://github.com/liberfa/pyerfa")
919 (synopsis "Python bindings for ERFA")
920 (description
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)))
927
928 (define-public python-sep
929 (package
930 (name "python-sep")
931 (version "1.1.1")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "sep" version))
936 (sha256
937 (base32 "0wxdqn92q1grv8k7xi7h88ac6wnznw4xh5bdlz1vz6za2dgsyj4m"))))
938 (build-system python-build-system)
939 (native-inputs
940 `(("cython" ,python-cython)
941 ("pytest" ,python-pytest)))
942 (inputs
943 `(("numpy" ,python-numpy)))
944 (home-page "https://github.com/kbarbary/sep")
945 (synopsis "Astronomical source extraction and photometry library")
946 (description
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
950 license:expat
951 license:lgpl3+))))
952
953 (define-public python-asdf
954 (package
955 (name "python-asdf")
956 (version "2.7.2")
957 (source
958 (origin
959 (method url-fetch)
960 (uri (pypi-uri "asdf" version))
961 (sha256
962 (base32 "1y47zhkd90i8wmm2i35amfl0rvjqlb3fcx90xp7n9kr2z0byzyzg"))))
963 (build-system python-build-system)
964 (arguments
965 ;; TODO: (Sharlatan-20210207T165820+0000): Tests depend on astropy, astropy
966 ;; depends on asdf. Disable circular dependence.
967 `(#:tests? #f))
968 (native-inputs
969 `(("packaging" ,python-packaging)
970 ("semantic-version" ,python-semantic-version)
971 ("setuptools-scm" ,python-setuptools-scm)))
972 (inputs
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")
979 (description
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)))
984
985 (define-public python-astroalign
986 (package
987 (name "python-astroalign")
988 (version "2.3.1")
989 (source
990 (origin
991 (method url-fetch)
992 (uri (pypi-uri "astroalign" version))
993 (sha256
994 (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
995 (build-system python-build-system)
996 (arguments
997 ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
998 `(#:tests? #f))
999 (inputs
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")
1006 (description
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)))
1010
1011 (define-public python-skyfield
1012 (package
1013 (name "python-skyfield")
1014 (version "1.38")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "skyfield" version))
1019 (sha256
1020 (base32 "1qi1l8qn6irdv6w41qq30s2yjwak7h6ayywr1pry9gwcm2c25bv5"))))
1021 (build-system python-build-system)
1022 (arguments
1023 ;; NOTE: (Sharlatan-20210207T163305+0000): tests depend on custom test
1024 ;; framework https://github.com/brandon-rhodes/assay
1025 `(#:tests? #f))
1026 (inputs
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")
1033 (description
1034 "Skyfield computes positions for the stars, planets, and satellites in
1035 orbit around the Earth.")
1036 (license license:expat)))