gnu: libdvdcss: Update to 1.4.3.
[jackhill/guix/guix.git] / gnu / packages / astronomy.scm
CommitLineData
82e4557d
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 John Darrington <jmd@gnu.org>
0ad41c32 3;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
47962191 4;;; Copyright © 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
ca310f65 5;;; Copyright © 2019 by Amar Singh <nly@disroot.org>
77704cb1 6;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
a19d63e8 7;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
906155e4 8;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
82e4557d
JD
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)
c9bd15c1 27 #:use-module ((guix licenses) #:prefix license:)
82e4557d 28 #:use-module (guix download)
ca310f65 29 #:use-module (guix git-download)
0e8054e8 30 #:use-module (guix utils)
77704cb1 31 #:use-module (gnu packages)
d284d89a 32 #:use-module (gnu packages algebra)
bd5b6ce0 33 #:use-module (gnu packages autotools)
ae416e85 34 #:use-module (gnu packages check)
0558e968 35 #:use-module (gnu packages compression)
d284d89a 36 #:use-module (gnu packages curl)
77704cb1 37 #:use-module (gnu packages fontutils)
0558e968 38 #:use-module (gnu packages gettext)
0558e968 39 #:use-module (gnu packages gl)
d284d89a 40 #:use-module (gnu packages glib)
67d24b15 41 #:use-module (gnu packages gnome)
d284d89a
GLV
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image)
ae416e85 44 #:use-module (gnu packages libusb)
d284d89a 45 #:use-module (gnu packages lua)
c9bd15c1 46 #:use-module (gnu packages maths)
77704cb1 47 #:use-module (gnu packages netpbm)
d284d89a
GLV
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages pretty-print)
56ec8d62 51 #:use-module (gnu packages python-check)
8fa76b83
SH
52 #:use-module (gnu packages python-crypto)
53 #:use-module (gnu packages python-science)
35d13a90 54 #:use-module (gnu packages python-xyz)
d284d89a
GLV
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages version-control)
87530f7b 57 #:use-module (gnu packages video)
d284d89a 58 #:use-module (gnu packages xiph)
77704cb1 59 #:use-module (gnu packages xorg)
0558e968 60 #:use-module (guix build-system cmake)
67d24b15 61 #:use-module (guix build-system gnu)
35d13a90 62 #:use-module (guix build-system python)
906155e4 63 #:use-module (ice-9 match)
67d24b15 64 #:use-module (srfi srfi-1))
82e4557d
JD
65
66(define-public cfitsio
67 (package
68 (name "cfitsio")
84ee8988 69 (version "3.49")
82e4557d
JD
70 (source
71 (origin
72 (method url-fetch)
73 (uri (string-append
0e8054e8 74 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
84ee8988 75 "cfitsio-" version ".tar.gz"))
82e4557d 76 (sha256
84ee8988 77 (base32 "1cyl1qksnkl3cq1fzl4dmjvkd6329b57y9iqyv44wjakbh6s4rav"))))
82e4557d 78 (build-system gnu-build-system)
0e8054e8
TGR
79 ;; XXX Building with curl currently breaks wcslib. It doesn't use
80 ;; pkg-config and hence won't link with -lcurl.
82e4557d 81 (arguments
84ee8988 82 `(#:tests? #f ; no tests
82e4557d
JD
83 #:phases
84 (modify-phases %standard-phases
85 (add-after 'unpack 'patch-paths
86 (lambda _
39fb6295
JD
87 (substitute* "Makefile.in" (("/bin/") ""))
88 #t)))))
b8181163 89 (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
82e4557d
JD
90 (synopsis "Library for reading and writing FITS files")
91 (description "CFITSIO provides simple high-level routines for reading and
d5d087ab 92writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
82e4557d
JD
93programmer from the internal complexities of the FITS format. CFITSIO also
94provides many advanced features for manipulating and filtering the information
95in FITS files.")
96 (license (license:non-copyleft "file://License.txt"
97 "See License.txt in the distribution."))))
2be83f6e 98
c1563fc1
SH
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
115for reading and writing.")
116 (license license:gpl2+)))
117
4fac8b8f
SH
118(define-public erfa
119 (package
120 (name "erfa")
fef8bc47 121 (version "1.7.3")
4fac8b8f
SH
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
fef8bc47 130 (base32 "0nh12dr7gk4ki55lz95pkm4fpf7kazirra3zax9pab6v4qql4hlw"))))
4fac8b8f
SH
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
4869a509
TGR
140 "The @acronym{ERFA, Essential Routines for Fundamental Astronomy} C library
141contains key algorithms for astronomy, and is based on the @acronym{SOFA,
142Standards of Fundamental Astronomy} library published by the @acronym{IAU,
143International Astronomical Union}.")
4fac8b8f
SH
144 (license license:bsd-3)))
145
51418c32
SH
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
162pixels of a moving window (retina) is trained to associate these input stimuli
163to the corresponding response in one or several output image(s). The resulting
164filter can be loaded in SExtractor to operate complex, wildly non-linear filters
165on astronomical images. Typical applications of EyE include adaptive filtering,
166feature detection and cosmetic corrections.")
167 (license license:cecill)))
168
2be83f6e
JD
169(define-public wcslib
170 (package
171 (name "wcslib")
5229d56d 172 (version "7.5")
2be83f6e
JD
173 (source
174 (origin
175 (method url-fetch)
176 (uri (string-append
f781251b 177 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
39fb6295 178 ".tar.bz2"))
2be83f6e 179 (sha256
5229d56d 180 (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
2be83f6e
JD
181 (inputs
182 `(("cfitsio" ,cfitsio)))
183 (build-system gnu-build-system)
184 (arguments
2516ba81
TGR
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
60b0c252
TGR
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’
ccfac015 198 ;; Parallel execution of the test suite is not supported.
60b0c252 199 #:parallel-tests? #f))
d4442eaf 200 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
a7074f47 201 (synopsis "Library which implements the FITS WCS standard")
1cfd7eaf
TGR
202 (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
203defines keywords and usage that provide for the description of astronomical
204coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
205header.")
2be83f6e 206 (license license:lgpl3+)))
c9bd15c1 207
a80d4892
SH
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
224polygon data in order to produce control maps which can directly be used in
225astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
226 (license license:gpl3+)))
227
c9bd15c1
JD
228(define-public gnuastro
229 (package
230 (name "gnuastro")
47962191 231 (version "0.14")
c9bd15c1
JD
232 (source
233 (origin
234 (method url-fetch)
235 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
38a3b666 236 version ".tar.lz"))
c9bd15c1
JD
237 (sha256
238 (base32
47962191 239 "1xp6n42qxv0x6yigi2w2l5k8006smv27lhrcssysgsvzbydghzg5"))))
c8b8e612
EF
240 (build-system gnu-build-system)
241 (arguments
242 '(#:configure-flags '("--disable-static")))
c9bd15c1
JD
243 (inputs
244 `(("cfitsio" ,cfitsio)
47962191 245 ("curl" ,curl-minimal)
c9bd15c1 246 ("gsl" ,gsl)
47962191 247 ("libgit2" ,libgit2)
4bd428a7 248 ("libjpeg" ,libjpeg-turbo)
edf07598
TGR
249 ("libtiff" ,libtiff)
250 ("wcslib" ,wcslib)
251 ("zlib" ,zlib)))
38a3b666 252 (native-inputs
bd5b6ce0
EF
253 `(("libtool" ,libtool)
254 ("lzip" ,lzip)))
6fd52309 255 (home-page "https://www.gnu.org/software/gnuastro/")
ea4678a4 256 (synopsis "Astronomy utilities")
c9bd15c1
JD
257 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
258programs for the manipulation and analysis of astronomical data.")
259 (license license:gpl3+)))
0558e968 260
b2d6f127
SH
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
302astronomical image. Although it is particularly oriented towards reduction of
303large scale galaxy-survey data, it can perform reasonably well on moderately
304crowded star fields.")
305 (license license:gpl3+)))
306
33648567
SH
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
332object lists in ASCII generated by the Stuff program to produce realistic
333astronomical fields. SkyMaker is part of the EFIGI
334(@url{https://www.astromatic.net/projects/efigi}) development project.")
335 (license license:gpl3+)))
336
19e08113
SH
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
395imaging: creating a high-quality still image out of a series of many (possibly
396thousands) low quality ones (blurred, deformed, noisy). The resulting image
397stack typically requires post-processing, including sharpening (e.g. via
398deconvolution). Such post-processing is not performed by Stackistry.")
399 (license license:gpl3+)))
400
0558e968
JD
401(define-public stellarium
402 (package
403 (name "stellarium")
ba1030be 404 (version "0.21.0")
a5883d1f
TGR
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
ba1030be 412 (base32 "04vg2asj9gygwnrs32scqc8192ln2lyqa9v7cjqk8zd4frkwszwp"))))
0558e968 413 (build-system cmake-build-system)
6b2afac9 414 (inputs
5bbf31cc 415 `(("qtbase" ,qtbase)
b74e2f61 416 ("qtlocation" ,qtlocation)
5bbf31cc
DM
417 ("qtmultimedia" ,qtmultimedia)
418 ("qtscript" ,qtscript)
419 ("qtserialport" ,qtserialport)
6b2afac9
DM
420 ("zlib" ,zlib)))
421 (native-inputs
4b93bc0d 422 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
09fbfe14 423 ("perl" ,perl) ; for pod2man
4b93bc0d 424 ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
5bbf31cc 425 ("qttools" ,qttools)))
f1021afb 426 (arguments
6885745d
KK
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 _
09fbfe14 436 ;; Make Qt render "offscreen", required for tests.
6885745d
KK
437 (setenv "QT_QPA_PLATFORM" "offscreen")
438 (setenv "HOME" "/tmp")
439 #t)))))
3d9f26a0 440 (home-page "https://stellarium.org/")
f1021afb
JD
441 (synopsis "3D sky viewer")
442 (description "Stellarium is a planetarium. It shows a realistic sky in
4433D, just like what you see with the naked eye, binoculars, or a telescope. It
444can be used to control telescopes over a serial port for tracking celestial
445objects.")
0558e968 446 (license license:gpl2+)))
ca310f65 447
c21ad767
SH
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.
464It generates object lists in ASCII which can read by the SkyMaker program to
465produce realistic astronomical fields. Stuff is part of the EFIGI development
466project.")
467 (license license:gpl3+)))
468
fe058ffb
SH
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
485any arbitrary astrometric projection defined in the WCS standard.")
486 (license license:gpl3+)))
487
ca310f65
AS
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)
4bd428a7 513 ("libjpeg" ,libjpeg-turbo)
ca310f65
AS
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
531dimensions. Celestia simulates many different types of celestial objects.
532From planets and moons to star clusters and galaxies, you can visit every
533object in the expandable database and view it from any point in space and
534time. The position and movement of solar system objects is calculated
535accurately in real time at any rate desired.")
536 (license license:gpl2+))))
67d24b15
AS
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))))
62470a01
EF
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
579Mechanics, 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
87530f7b
SH
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
622imaging: creating a high-quality still image out of a series of many thousands)
623low quality ones")
624 (license license:gpl3+)))
625
906155e4
SH
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
665standard 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
1aee32a2
SH
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
691on 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
77704cb1
VK
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)
1628d57b 731 ("libjpeg" ,libjpeg-turbo)
77704cb1
VK
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.
748All of the major planets and most satellites can be drawn and different map
749projections are also supported, including azimuthal, hemisphere, Lambert,
750Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
751 (license license:gpl2+)))
a19d63e8
GLV
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
788application. It can track a large number of satellites and display their
789position and other data in lists, tables, maps, and polar plots (radar view).
790Gpredict can also predict the time of future passes for a satellite, and
791provide you with detailed information about each pass.")
792 (home-page "http://gpredict.oz9aec.net/index.php")
793 (license license:gpl2+)))
ae416e85
SH
794
795(define-public indi
796 (package
797 (name "indi")
b94d4e6a 798 (version "1.8.9")
ae416e85
SH
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
b94d4e6a 807 (base32 "0nw4b2cdsg244slcm3yf1v11jlxbbjrpvi6ax90svs7rlandz8jv"))))
ae416e85
SH
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
846control protocol designed to operate astronomical instrumentation. INDI is
847small, flexible, easy to parse, scalable, and stateless. It supports common
848DCS functions such as remote control, data acquisition, monitoring, and a lot
849more.")
850 (license (list license:bsd-3
851 license:gpl2+
852 license:lgpl2.0+
853 license:lgpl2.1+))))
35d13a90
SH
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
884JPL ephemerides use to predict raw (x,y,z) planetary positions.")
885 (license license:expat)))
8fa76b83 886
56ec8d62
SH
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
922Routines for Fundamental Astronomy), a C library containing key algorithms for
923astronomy, which is based on the SOFA library published by the International
924Astronomical Union (IAU). All C routines are wrapped as Numpy universal
925functions, so that they can be called with scalar or array inputs.")
926 (license license:bsd-3)))
927
d1bd22b9
SH
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
948of stand-alone functions and classes.")
949 (license (list license:bsd-3
950 license:expat
951 license:lgpl3+))))
952
f498823e
SH
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)))
f63b3eae 977 (home-page "https://github.com/asdf-format/asdf")
f498823e
SH
978 (synopsis "Python tools to handle ASDF files")
979 (description
980 "The Advanced Scientific Data Format (ASDF) is a next-generation
981interchange format for scientific data. This package contains the Python
982implementation of the ASDF Standard.")
983 (license license:bsd-3)))
984
d6996fa0
SH
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
1008astronomical images, especially when there is no WCS information available.")
1009 (license license:expat)))
1010
8fa76b83
SH
1011(define-public python-skyfield
1012 (package
1013 (name "python-skyfield")
50ad53c7 1014 (version "1.38")
8fa76b83
SH
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "skyfield" version))
1019 (sha256
50ad53c7 1020 (base32 "1qi1l8qn6irdv6w41qq30s2yjwak7h6ayywr1pry9gwcm2c25bv5"))))
8fa76b83
SH
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
1035orbit around the Earth.")
1036 (license license:expat)))