gnu: ocaml-linenoise: Update to 1.4.0.
[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–2022 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2019 by Amar Singh <nly@disroot.org>
6 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
7 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
8 ;;; Copyright © 2021, 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
9 ;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
10 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
11 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages astronomy)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (gnu packages algebra)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages bison)
34 #:use-module (gnu packages boost)
35 #:use-module (gnu packages check)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages curl)
38 #:use-module (gnu packages flex)
39 #:use-module (gnu packages fontutils)
40 #:use-module (gnu packages gcc)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages libusb)
48 #:use-module (gnu packages lua)
49 #:use-module (gnu packages maths)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages netpbm)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages pretty-print)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages python-build)
57 #:use-module (gnu packages python-check)
58 #:use-module (gnu packages python-crypto)
59 #:use-module (gnu packages python-science)
60 #:use-module (gnu packages python-web)
61 #:use-module (gnu packages python-xyz)
62 #:use-module (gnu packages qt)
63 #:use-module (gnu packages readline)
64 #:use-module (gnu packages time)
65 #:use-module (gnu packages version-control)
66 #:use-module (gnu packages video)
67 #:use-module (gnu packages wxwidgets)
68 #:use-module (gnu packages xiph)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system copy)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system python)
76 #:use-module (guix download)
77 #:use-module (guix gexp)
78 #:use-module (guix git-download)
79 #:use-module (guix packages)
80 #:use-module (guix utils)
81 #:use-module (ice-9 match)
82 #:use-module (srfi srfi-1))
83
84 (define-public aocommon
85 (let ((commit "7329a075271edab8f6264db649e81e62b2b6ae5e")
86 (revision "1"))
87 (package
88 (name "aocommon")
89 (version (git-version "0.0.0" revision commit))
90 (source
91 (origin
92 (method git-fetch)
93 (uri (git-reference
94 (url "https://gitlab.com/aroffringa/aocommon")
95 (commit commit)))
96 (sha256
97 (base32 "0qcfax6pbzs0yigy0x8xibrkk539wm2pbvjsb4lh50fybir02nix"))
98 (file-name (git-file-name name version))))
99 (build-system copy-build-system)
100 (arguments
101 (list #:install-plan
102 #~'(("include/aocommon" "include/aocommon"))))
103 (home-page "https://gitlab.com/aroffringa/aocommon")
104 (synopsis "Collection of functionality that is reused in astronomical applications")
105 (description
106 "This package provides source-only AOCommon collection of functionality that is
107 reused in several astronomical applications, such as @code{wsclean},
108 @code{aoflagger}, @code{DP3} and @code{everybeam}.")
109 (license license:gpl3+))))
110
111 (define-public calceph
112 (package
113 (name "calceph")
114 (version "3.5.1")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append
119 "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-"
120 version ".tar.gz"))
121 (sha256
122 (base32 "078wn773pwf4pg9m0h0l00g4aq744pq1rb6kz6plgdpzp3hhpk1k"))))
123 (build-system gnu-build-system)
124 (native-inputs
125 (list gfortran))
126 (home-page "https://www.imcce.fr/inpop/calceph")
127 (properties `((release-monitoring-url . ,home-page)))
128 (synopsis "Astronomical library to access the binary planetary ephemeris files")
129 (description
130 "The CALCEPH Library is designed to access the binary planetary ephemeris files,
131 such INPOPxx and JPL DExxx ephemeris files, (called @code{original JPL binary} or
132 @code{INPOP 2.0 or 3.0 binary} ephemeris files in the next sections) and the SPICE
133 kernel files (called @code{SPICE} ephemeris files in the next sections). At the
134 moment, supported SPICE files are:
135
136 @itemize
137 @item text Planetary Constants Kernel (KPL/PCK) files;
138 @item binary PCK (DAF/PCK) files;
139 @item binary SPK (DAF/SPK) files containing segments of type 1, 2, 3, 5, 8, 9,
140 12, 13, 17, 18, 19, 20, 21, 102, 103 and 120;
141 @item meta kernel (KPL/MK) files;
142 @item frame kernel (KPL/FK) files (only basic support).
143 @end itemize\n")
144 (license license:cecill)))
145
146 (define-public aoflagger
147 (package
148 (name "aoflagger")
149 (version "3.2.0")
150 (source
151 (origin
152 (method git-fetch)
153 (uri (git-reference
154 (url "https://gitlab.com/aroffringa/aoflagger")
155 (commit (string-append "v" version))))
156 (sha256
157 (base32 "1dcbfrbiybhpbypna2xhddx1wk7yifh38ha2r6p5rzsikzwlsin1"))
158 (patches
159 (search-patches "aoflagger-use-system-provided-pybind11.patch"))
160 (file-name (git-file-name name version))))
161 (build-system cmake-build-system)
162 (arguments
163 (list
164 ;; XXX: Tests require external files download from
165 ;; https://www.astron.nl/citt/ci_data/aoflagger/
166 ;; FIXME: runtest is not found
167 #:tests? #f
168 #:configure-flags
169 #~(list (string-append "-DCASACORE_ROOT_DIR="
170 #$(this-package-input "casacore")))
171 #:phases
172 #~(modify-phases %standard-phases
173 ;; aocommon and pybind11 are expected to be found as git submodules,
174 ;; link them before build.
175 (add-after 'unpack 'link-submodule-package
176 (lambda _
177 (rmdir "external/aocommon")
178 (symlink #$(this-package-native-input "aocommon")
179 (string-append (getcwd) "/external/aocommon")))))))
180 (native-inputs
181 (list aocommon
182 boost
183 pkg-config
184 python
185 pybind11))
186 (inputs
187 (list casacore
188 cfitsio
189 fftw
190 gsl
191 gtkmm-3
192 hdf5
193 lapack
194 libpng
195 libsigc++
196 libxml2
197 lua
198 openblas
199 zlib))
200 (home-page "https://gitlab.com/aroffringa/aoflagger")
201 (synopsis "Astronomical tool that can find and remove radio-frequency interference")
202 (description
203 "AOFlagger is a tool that can find and remove radio-frequency
204 interference (RFI) in radio astronomical observations. It can make use of Lua
205 scripts to make flagging strategies flexible, and the tools are applicable to a
206 wide set of telescopes.")
207 (license license:gpl3+)))
208
209 (define-public casacore
210 (package
211 (name "casacore")
212 (version "3.4.0")
213 (source
214 (origin
215 (method git-fetch)
216 (uri (git-reference
217 (url "https://github.com/casacore/casacore")
218 (commit (string-append "v" version))))
219 (sha256
220 (base32
221 "05ar5gykgh4dm826xplj5ri5rw7znhxrvin2l67a3mjwfys7r2a0"))
222 (file-name (git-file-name name version))))
223 (build-system cmake-build-system)
224 (arguments
225 (list
226 ;; Note: There are multiple failures in
227 ;; tests which require additional measures data. They are
228 ;; distributed via FTP without any license:
229 ;; ftp://ftp.astron.nl/outgoing/Measures/
230 ;; TODO: Check how to fix tests.
231 #:tests? #f
232 #:parallel-build? #t
233 #:configure-flags
234 #~(list "-DBUILD_PYTHON3=ON"
235 "-DBUILD_PYTHON=OFF"
236 "-DBUILD_TESTING=TRUE"
237 "-DUSE_HDF5=ON"
238 "-DUSE_OPENMP=OFF"
239 "-DUSE_THREADS=ON"
240 (string-append "-DDATA_DIR=" #$output "/data")
241 (string-append "-DPYTHON3_EXECUTABLE="
242 #$(this-package-input "python") "/bin")
243 (string-append "-DPYTHON3_INCLUDE_DIR="
244 #$(this-package-input "python") "/include")
245 (string-append "-DPYTHON3_LIBRARY="
246 #$(this-package-input "python") "/lib"))
247 #:phases
248 #~(modify-phases %standard-phases
249 (add-after 'unpack 'set-env
250 (lambda _
251 (setenv "HOME" "/tmp")))
252 (add-after 'unpack 'use-absolute-rm
253 (lambda* (#:key inputs #:allow-other-keys)
254 (substitute* "casa/OS/test/tFile.run"
255 (("/bin/rm")
256 (search-input-file inputs "/bin/rm")))))
257 (add-after 'unpack 'use-absolute-python3
258 (lambda _
259 (substitute* "build-tools/casacore_floatcheck"
260 (("#!/usr/bin/env python")
261 (string-append "#!" (which "python3"))))))
262 ;; NOTE: (Sharlatan-20220611T200837+0100): Workaround for casacore
263 ;; tests stuck with missing "qsub" issue.
264 ;; https://github.com/casacore/casacore/issues/1122
265 (add-after 'unpack 'patch-pre-test-checks
266 (lambda _
267 (substitute* "build-tools/casacore_assay"
268 (("QSUBP=.*$") "QSUBP=\n")
269 (("YODP=.*$") "YODP=\n")))))))
270 (native-inputs
271 (list bison
272 boost
273 flex
274 readline))
275 (inputs
276 (list cfitsio
277 fftw
278 fftwf
279 gfortran
280 hdf5
281 lapack
282 ncurses
283 openblas
284 python
285 python-numpy
286 wcslib))
287 (home-page "http://casacore.github.io/casacore/")
288 (synopsis "Suite of C++ libraries for radio astronomy data processing")
289 (description
290 "The casacore package contains the core libraries of the old
291 AIPS++/CASA (Common Astronomy Software Application) package. This split was
292 made to get a better separation of core libraries and applications.
293 @url{https://casa.nrao.edu/, CASA} is now built on top of Casacore.")
294 (license license:gpl2+)))
295
296 (define-public cfitsio
297 (package
298 (name "cfitsio")
299 (version "3.49")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (string-append
304 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
305 "cfitsio-" version ".tar.gz"))
306 (sha256
307 (base32 "1cyl1qksnkl3cq1fzl4dmjvkd6329b57y9iqyv44wjakbh6s4rav"))))
308 (build-system gnu-build-system)
309 ;; XXX Building with curl currently breaks wcslib. It doesn't use
310 ;; pkg-config and hence won't link with -lcurl.
311 (arguments
312 `(#:tests? #f ; no tests
313 #:phases
314 (modify-phases %standard-phases
315 (add-after 'unpack 'patch-paths
316 (lambda _
317 (substitute* "Makefile.in" (("/bin/") ""))
318 #t)))))
319 (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
320 (synopsis "Library for reading and writing FITS files")
321 (description "CFITSIO provides simple high-level routines for reading and
322 writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
323 programmer from the internal complexities of the FITS format. CFITSIO also
324 provides many advanced features for manipulating and filtering the information
325 in FITS files.")
326 (license (license:non-copyleft "file://License.txt"
327 "See License.txt in the distribution."))))
328
329 (define-public python-fitsio
330 (package
331 (name "python-fitsio")
332 (version "1.1.7")
333 (source
334 (origin
335 (method url-fetch)
336 (uri (pypi-uri "fitsio" version))
337 (sha256
338 (base32 "0q8siijys9kmjnqvyipjgh6hkhf4fwvr1swhsf4if211i9b0m1xy"))
339 (modules '((guix build utils)))
340 (snippet
341 ;; Remove the bundled cfitsio
342 `(begin
343 (delete-file-recursively "cfitsio3490")
344 (substitute* "MANIFEST.in"
345 (("recursive-include cfitsio3490.*$\n") ""))))))
346 (build-system python-build-system)
347 (arguments
348 `(#:phases
349 (modify-phases %standard-phases
350 (add-after 'unpack 'unbundle-cfitsio
351 (lambda* (#:key inputs #:allow-other-keys)
352 (let* ((cfitsio (assoc-ref inputs "cfitsio"))
353 (includedir (string-append "\"" cfitsio "/include\""))
354 (libdir (string-append "\"" cfitsio "/lib\"")))
355 ;; Use Guix' cfitsio instead of the bundled one
356 (substitute* "setup.py"
357 (("self.use_system_fitsio = False") "pass")
358 (("self.system_fitsio_includedir = None") "pass")
359 (("self.system_fitsio_libdir = None") "pass")
360 (("self.use_system_fitsio") "True")
361 (("self.system_fitsio_includedir") includedir)
362 (("self.system_fitsio_libdir") libdir)))))
363 (add-after 'unpack 'skip-bzip2-test
364 (lambda* (#:key inputs #:allow-other-keys)
365 ;; The bzip2 test fails because Guix' cfitsio
366 ;; is built without bzip2 support.
367 (substitute* "fitsio/test.py"
368 (("'SKIP_BZIP_TEST' in os.environ") "True")))))))
369 (propagated-inputs
370 (list python-numpy cfitsio))
371 (home-page "https://github.com/esheldon/fitsio")
372 (synopsis
373 "Python library to read from and write to FITS files")
374 (description
375 "This package provides a Python library for reading from and writing
376 to @acronym{FITS, Flexible Image Transport System} files using the
377 CFITSIO library. Among other things, it can
378
379 @itemize
380 @item read and write image, binary, and ascii table extensions;
381
382 @item read arbitrary subsets of tables in a lazy manner;
383
384 @item query the rows and columns of a table;
385
386 @item read and write header keywords;
387
388 @item read and write Gzip files.
389 @end itemize")
390 (license license:gpl2+)))
391
392 (define-public qfits
393 (package
394 (name "qfits")
395 (version "6.2.0")
396 (source
397 (origin
398 (method url-fetch)
399 (uri
400 (string-append "ftp://ftp.eso.org/pub/qfits/qfits-" version ".tar.gz"))
401 (sha256
402 (base32 "0m2b21mim3a7wgfg3ph2w5hv7mdvr03jmmhzipc0wcahijglcw9j"))))
403 (build-system gnu-build-system)
404 (home-page "https://www.eso.org/sci/software/eclipse/qfits/")
405 (synopsis "C library offering access to astronomical FITS files")
406 (description
407 "@code{qfits} is a C library giving access to FITS file internals, both
408 for reading and writing.")
409 (license license:gpl2+)))
410
411 (define-public erfa
412 (package
413 (name "erfa")
414 (version "2.0.0")
415 (source
416 (origin
417 (method git-fetch)
418 (uri (git-reference
419 (url "https://github.com/liberfa/erfa")
420 (commit (string-append "v" version))))
421 (file-name (git-file-name name version))
422 (sha256
423 (base32 "0s9dpj0jdkqcg552f00jhd722czji4pffabmpys5pgi6djckq4f4"))))
424 (build-system gnu-build-system)
425 (native-inputs
426 (list automake autoconf libtool pkg-config))
427 (home-page "https://github.com/liberfa/erfa")
428 (synopsis "Essential Routines for Fundamental Astronomy")
429 (description
430 "The @acronym{ERFA, Essential Routines for Fundamental Astronomy} C library
431 contains key algorithms for astronomy, and is based on the @acronym{SOFA,
432 Standards of Fundamental Astronomy} library published by the @acronym{IAU,
433 International Astronomical Union}.")
434 (license license:bsd-3)))
435
436 (define-public eye
437 (package
438 (name "eye")
439 (version "1.4.1")
440 (source
441 (origin
442 (method url-fetch)
443 (uri (string-append "https://www.astromatic.net/download/eye/"
444 "eye-" version ".tar.gz"))
445 (sha256
446 (base32 "092qhzcbrkcfidbx4bv9wz42w297n80jk7a6kwyi9a3fjfz81d7k"))))
447 (build-system gnu-build-system)
448 (home-page "https://www.astromatic.net/software/eye")
449 (synopsis "Small image feature detector using machine learning")
450 (description
451 "In EyE (Enhance Your Extraction) an artificial neural network connected to
452 pixels of a moving window (retina) is trained to associate these input stimuli
453 to the corresponding response in one or several output image(s). The resulting
454 filter can be loaded in SExtractor to operate complex, wildly non-linear filters
455 on astronomical images. Typical applications of EyE include adaptive filtering,
456 feature detection and cosmetic corrections.")
457 (license license:cecill)))
458
459 (define-public wcslib
460 (package
461 (name "wcslib")
462 (version "7.5")
463 (source
464 (origin
465 (method url-fetch)
466 (uri (string-append
467 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
468 ".tar.bz2"))
469 (sha256
470 (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
471 (inputs
472 (list cfitsio))
473 (build-system gnu-build-system)
474 (arguments
475 `(#:configure-flags
476 (list (string-append "--with-cfitsiolib="
477 (assoc-ref %build-inputs "cfitsio") "/lib")
478 (string-append "--with-cfitsioinc="
479 (assoc-ref %build-inputs "cfitsio") "/include"))
480 #:phases
481 (modify-phases %standard-phases
482 (add-before 'configure 'patch-/bin/sh
483 (lambda _
484 (substitute* "makedefs.in"
485 (("/bin/sh") "sh"))
486 #t))
487 (delete 'install-license-files)) ; installed by ‘make install’
488 ;; Parallel execution of the test suite is not supported.
489 #:parallel-tests? #f))
490 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
491 (synopsis "Library which implements the FITS WCS standard")
492 (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
493 defines keywords and usage that provide for the description of astronomical
494 coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
495 header.")
496 (license license:lgpl3+)))
497
498 (define-public weightwatcher
499 (package
500 (name "weightwatcher")
501 (version "1.12")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (string-append "https://www.astromatic.net/download/weightwatcher/"
506 "weightwatcher-" version ".tar.gz"))
507 (sha256
508 (base32 "1zaqd8d9rpgcwjsp92q3lkfaa22i20gppb91dz34ym54swisjc2p"))))
509 (build-system gnu-build-system)
510 (home-page "https://www.astromatic.net/software/weightwatcher")
511 (synopsis "Weight-map/flag-map multiplexer and rasteriser")
512 (description
513 "Weightwatcher is a program hat combines weight-maps, flag-maps and
514 polygon data in order to produce control maps which can directly be used in
515 astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
516 (license license:gpl3+)))
517
518 (define-public gnuastro
519 (package
520 (name "gnuastro")
521 (version "0.18")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
526 version ".tar.lz"))
527 (sha256
528 (base32
529 "1y9ig2kkwiwl0rmp9ip9n83fyjjpg2cc2pxzvdzr8rysq5az357y"))))
530 (build-system gnu-build-system)
531 (arguments
532 '(#:configure-flags '("--disable-static")))
533 (inputs
534 (list cfitsio
535 curl-minimal
536 gsl
537 libgit2
538 libjpeg-turbo
539 libtiff
540 wcslib
541 zlib))
542 (native-inputs
543 (list libtool lzip))
544 (home-page "https://www.gnu.org/software/gnuastro/")
545 (synopsis "Astronomy utilities")
546 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
547 programs for the manipulation and analysis of astronomical data.")
548 (license license:gpl3+)))
549
550 (define-public sextractor
551 (package
552 (name "sextractor")
553 (version "2.25.0")
554 (source
555 (origin
556 (method git-fetch)
557 (uri (git-reference
558 (url "https://github.com/astromatic/sextractor")
559 (commit version)))
560 (file-name (git-file-name name version))
561 (sha256
562 (base32 "0q69n3nyal57h3ik2xirwzrxzljrwy9ivwraxzv9566vi3n4z5mw"))))
563 (build-system gnu-build-system)
564 ;; NOTE: (Sharlatan-20210124T103117+0000): Building with `atlas' is failing
565 ;; due to missing shared library which required on configure phase. Switch
566 ;; build to use `openblas' instead. It requires FFTW with single precision
567 ;; `fftwf'.
568 (arguments
569 `(#:configure-flags
570 (list
571 "--enable-openblas"
572 (string-append
573 "--with-openblas-libdir=" (assoc-ref %build-inputs "openblas") "/lib")
574 (string-append
575 "--with-openblas-incdir=" (assoc-ref %build-inputs "openblas") "/include")
576 (string-append
577 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
578 (string-append
579 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
580 (native-inputs
581 (list autoconf automake libtool))
582 (inputs
583 `(("openblas" ,openblas)
584 ("fftw" ,fftwf)))
585 (home-page "http://www.astromatic.net/software/sextractor")
586 (synopsis "Extract catalogs of sources from astronomical images")
587 (description
588 "SExtractor is a program that builds a catalogue of objects from an
589 astronomical image. Although it is particularly oriented towards reduction of
590 large scale galaxy-survey data, it can perform reasonably well on moderately
591 crowded star fields.")
592 (license license:gpl3+)))
593
594 (define-public skymaker
595 (package
596 (name "skymaker")
597 (version "3.10.5")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append "https://www.astromatic.net/download/skymaker/"
602 "skymaker-" version ".tar.gz"))
603 (sha256
604 (base32 "03zvx7c89plp9559niqv5532r233kza3ir992rg3nxjksqmrqvx1"))))
605 (build-system gnu-build-system)
606 (arguments
607 `(#:configure-flags
608 (list
609 (string-append
610 "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
611 (string-append
612 "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
613 (inputs
614 `(("fftw" ,fftwf)))
615 (home-page "https://www.astromatic.net/software/skymaker")
616 (synopsis "Astronomical image simulator")
617 (description
618 "SkyMaker is a program that simulates astronomical images. It accepts
619 object lists in ASCII generated by the Stuff program to produce realistic
620 astronomical fields. SkyMaker is part of the EFIGI
621 (@url{https://www.astromatic.net/projects/efigi}) development project.")
622 (license license:gpl3+)))
623
624 (define-public stackistry
625 (package
626 (name "stackistry")
627 (version "0.3.0")
628 (source
629 (origin
630 (method git-fetch)
631 (uri (git-reference
632 (url "https://github.com/GreatAttractor/stackistry")
633 (commit (string-append "v" version))))
634 (file-name (git-file-name name version))
635 (sha256
636 (base32 "0rz29v33n0x0k40hv3v79ym5ylch1v0pbph4i21809gz2al5p7dq"))))
637 (build-system gnu-build-system)
638 (arguments
639 `(#:make-flags
640 (list
641 (string-append
642 "SKRY_INCLUDE_PATH=" (assoc-ref %build-inputs "libskry") "/include")
643 (string-append
644 "SKRY_LIB_PATH=-L" (assoc-ref %build-inputs "libskry") "/lib")
645 (string-append
646 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
647 #:phases
648 (modify-phases %standard-phases
649 ;; no configure and tests are provided
650 (delete 'configure)
651 (delete 'check)
652 (add-after 'unpack 'fix-paths
653 (lambda* (#:key outputs #:allow-other-keys)
654 (substitute* "src/main.cpp"
655 (("\"\\.\\.\", \"lang\"")
656 "\"../share/stackistry\", \"lang\""))
657 (substitute* "src/utils.cpp"
658 (("\"\\.\\.\", \"icons\"")
659 "\"../share/stackistry\", \"icons\""))
660 #t))
661 (replace 'install
662 ;; The Makefile lacks an ‘install’ target.
663 (lambda* (#:key outputs #:allow-other-keys)
664 (let* ((out (assoc-ref outputs "out"))
665 (bin (string-append out "/bin"))
666 (icons (string-append out "/share/stackistry/icons"))
667 (lang (string-append out "/share/stackistry/lang")))
668 (copy-recursively "bin" bin)
669 (copy-recursively "icons" icons)
670 (copy-recursively "lang" lang))
671 #t)))))
672 (native-inputs
673 (list pkg-config))
674 (inputs
675 (list gtkmm-3 libskry ffmpeg))
676 (home-page "https://github.com/GreatAttractor/stackistry")
677 (synopsis "Astronomical lucky imaging/image stacking tool")
678 (description
679 "Stackistry implements the lucky imaging principle of astronomical
680 imaging: creating a high-quality still image out of a series of many (possibly
681 thousands) low quality ones (blurred, deformed, noisy). The resulting image
682 stack typically requires post-processing, including sharpening (e.g. via
683 deconvolution). Such post-processing is not performed by Stackistry.")
684 (license license:gpl3+)))
685
686 (define-public stellarium
687 (package
688 (name "stellarium")
689 (version "0.21.1")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (string-append "https://github.com/Stellarium/stellarium"
694 "/releases/download/v" version
695 "/stellarium-" version ".tar.gz"))
696 (sha256
697 (base32 "049jlc8vx06pad5h2syrmf7f1l346yr5iraai0wkn8s8pk30j8q7"))))
698 (build-system cmake-build-system)
699 (inputs
700 (list qtbase-5
701 qtlocation
702 qtmultimedia-5
703 qtscript
704 qtserialport
705 zlib))
706 (native-inputs
707 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
708 ("perl" ,perl) ; for pod2man
709 ("qtbase" ,qtbase-5) ; Qt MOC is needed at compile time
710 ("qttools-5" ,qttools-5)))
711 (arguments
712 `(#:test-target "test"
713 #:configure-flags (list "-DENABLE_TESTING=1"
714 (string-append
715 "-DCMAKE_CXX_FLAGS=-isystem "
716 (assoc-ref %build-inputs "qtserialport")
717 "/include/qt5"))
718 #:phases (modify-phases %standard-phases
719 (add-before 'check 'set-offscreen-display
720 (lambda _
721 ;; Make Qt render "offscreen", required for tests.
722 (setenv "QT_QPA_PLATFORM" "offscreen")
723 (setenv "HOME" "/tmp")
724 #t)))))
725 (home-page "https://stellarium.org/")
726 (synopsis "3D sky viewer")
727 (description "Stellarium is a planetarium. It shows a realistic sky in
728 3D, just like what you see with the naked eye, binoculars, or a telescope. It
729 can be used to control telescopes over a serial port for tracking celestial
730 objects.")
731 (license license:gpl2+)))
732
733 (define-public stuff
734 (package
735 (name "stuff")
736 (version "1.26.0")
737 (source
738 (origin
739 (method url-fetch)
740 (uri (string-append "https://www.astromatic.net/download/stuff/"
741 "stuff-" version ".tar.gz"))
742 (sha256
743 (base32 "1syibi3b86z9pikhicvkkmgxm916j732fdiw0agw0lq6z13fdcjm"))))
744 (build-system gnu-build-system)
745 (home-page "https://www.astromatic.net/software/stuff")
746 (synopsis "Astronomical catalogue simulation")
747 (description
748 "Stuff is a program that simulates \"perfect\" astronomical catalogues.
749 It generates object lists in ASCII which can read by the SkyMaker program to
750 produce realistic astronomical fields. Stuff is part of the EFIGI development
751 project.")
752 (license license:gpl3+)))
753
754 (define-public swarp
755 (package
756 (name "swarp")
757 (version "2.38.0")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (string-append "https://www.astromatic.net/download/swarp/"
762 "swarp-" version ".tar.gz"))
763 (sha256
764 (base32 "1i670waqp54vin1cn08mqckcggm9zqd69nk7yya2vvqpdizn6jpm"))))
765 (build-system gnu-build-system)
766 (home-page "https://www.astromatic.net/software/swarp")
767 (synopsis "FITS image resampling and co-addition")
768 (description
769 "SWarp is a program that resamples and co-adds together FITS images using
770 any arbitrary astrometric projection defined in the WCS standard.")
771 (license license:gpl3+)))
772
773 (define-public celestia
774 (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce"))
775 (package
776 (name "celestia")
777 (version (git-version "1.6.1" "815" commit))
778 (source (origin
779 (method git-fetch)
780 (uri (git-reference
781 (url "https://github.com/celestiaproject/celestia")
782 (commit commit)))
783 (file-name (git-file-name name version))
784 (sha256
785 (base32
786 "00xibg87l1arzifakgj7s828x9pszcgx7x7ij88a561ig49ryh78"))))
787 (build-system cmake-build-system)
788 (native-inputs
789 `(("perl" ,perl)
790 ("libgit2" ,libgit2)
791 ("pkg-config" ,pkg-config)
792 ("libtool" ,libtool)
793 ("gettext" ,gettext-minimal)))
794 (inputs
795 `(("glu" ,glu)
796 ("glew" ,glew)
797 ("libtheora" ,libtheora)
798 ("libjpeg" ,libjpeg-turbo)
799 ("libpng" ,libpng)
800 ;; maybe required?
801 ("mesa" ,mesa)
802 ;; optional: fmtlib, Eigen3;
803 ("fmt" ,fmt-7)
804 ("eigen" ,eigen)
805 ;; glut: for glut interface
806 ("freeglut" ,freeglut)))
807 (propagated-inputs
808 (list lua))
809 (arguments
810 `(#:configure-flags '("-DENABLE_GLUT=ON" "-DENABLE_QT=OFF")
811 #:tests? #f)) ;no tests
812 (home-page "https://celestia.space/")
813 (synopsis "Real-time 3D visualization of space")
814 (description
815 "This simulation program lets you explore our universe in three
816 dimensions. Celestia simulates many different types of celestial objects.
817 From planets and moons to star clusters and galaxies, you can visit every
818 object in the expandable database and view it from any point in space and
819 time. The position and movement of solar system objects is calculated
820 accurately in real time at any rate desired.")
821 (license license:gpl2+))))
822
823 (define-public celestia-gtk
824 (package
825 (inherit celestia)
826 (name "celestia-gtk")
827 (inputs
828 (append (alist-delete "freeglut" (package-inputs celestia))
829 `(("gtk2" ,gtk+-2)
830 ("gtkglext" ,gtkglext))))
831 (arguments
832 `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
833 #:tests? #f))))
834
835 (define-public python-astropy
836 (package
837 (name "python-astropy")
838 (version "5.0.1")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "astropy" version))
843 (sha256
844 (base32 "09wh589ywjsgjvi76v2d2zqd9sri0461rrnml0b0pah5lbkcv0k3"))
845 (modules '((guix build utils)))
846 (snippet
847 '(begin
848 ;; Remove Python bundles.
849 (with-directory-excursion "astropy/extern"
850 (for-each delete-file-recursively '("ply" "configobj")))
851 ;; Remove cextern bundles and leave the wcslib bundle. Astropy
852 ;; upgrades to different versions of wcslib every few releases
853 ;; and tests break every upgrade.
854 ;; TODO: unbundle wcslib.
855 (with-directory-excursion "cextern"
856 (for-each delete-file-recursively '("cfitsio" "expat")))
857 #t))))
858 (build-system python-build-system)
859 (arguments
860 `(#:phases
861 (modify-phases %standard-phases
862 (add-after 'unpack 'preparations
863 (lambda _
864 ;; Use our own libraries in place of bundles, with the
865 ;; exception of wcslib.
866 (setenv "ASTROPY_USE_SYSTEM_CFITSIO" "1")
867 (setenv "ASTROPY_USE_SYSTEM_EXPAT" "1")
868 ;; Some tests require a writable home.
869 (setenv "HOME" "/tmp")
870 ;; Relax xfail tests.
871 (substitute* "setup.cfg"
872 (("xfail_strict = true") "xfail_strict = false"))
873 ;; Replace all references to external ply.
874 (let ((ply-files '("coordinates/angle_formats.py"
875 "utils/parsing.py")))
876 (with-directory-excursion "astropy"
877 (map (lambda (file)
878 (substitute* file (("astropy.extern.ply")
879 "ply")))
880 ply-files)))
881 ;; Replace reference to external configobj.
882 (with-directory-excursion "astropy/config"
883 (substitute* "configuration.py"
884 (("from astropy.extern.configobj ") "")))))
885 ;; This file is opened in both install and check phases.
886 (add-before 'install 'writable-compiler
887 (lambda _ (make-file-writable "astropy/_compiler.c")))
888 (add-before 'check 'writable-compiler
889 (lambda _ (make-file-writable "astropy/_compiler.c")))
890 (replace 'check
891 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
892 (when tests?
893 (add-installed-pythonpath inputs outputs)
894 ;; Extensions have to be rebuilt before running the tests.
895 (invoke "python" "setup.py" "build_ext" "--inplace")
896 (invoke "python" "-m" "pytest" "--pyargs" "astropy"
897 ;; Skip tests that need remote data.
898 "-m" "not remote_data")))))))
899 (native-inputs
900 (list pkg-config
901 python-coverage
902 python-cython
903 python-extension-helpers
904 python-ipython
905 python-jplephem
906 python-objgraph
907 python-pytest
908 python-pytest-astropy
909 python-pytest-xdist
910 python-setuptools-scm
911 python-sgp4
912 python-skyfield))
913 (inputs
914 (list cfitsio expat))
915 (propagated-inputs
916 (list python-configobj
917 python-numpy
918 python-packaging
919 python-ply
920 python-pyerfa
921 python-pyyaml))
922 (home-page "https://www.astropy.org/")
923 (synopsis "Core package for Astronomy in Python")
924 (description
925 "Astropy is a single core package for Astronomy in Python. It contains
926 much of the core functionality and some common tools needed for performing
927 astronomy and astrophysics.")
928 (license license:bsd-3)))
929
930 (define-public python-astropy-healpix
931 (package
932 (name "python-astropy-healpix")
933 (version "0.6")
934 (source
935 (origin
936 (method url-fetch)
937 (uri (pypi-uri "astropy-healpix" version))
938 (sha256
939 (base32 "1436ml03xkmvx4afzbhfj67ab91418sz1w3lq1b18r43qchnd6j0"))))
940 (build-system python-build-system)
941 (arguments
942 `(#:phases
943 (modify-phases %standard-phases
944 ;; This file is opened in both install and check phases.
945 (add-before 'install 'writable-compiler
946 (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
947 (add-before 'check 'writable-compiler
948 (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
949 (replace 'check
950 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
951 (when tests?
952 (add-installed-pythonpath inputs outputs)
953 ;; Extensions have to be rebuilt before running the tests.
954 (invoke "python" "setup.py" "build_ext" "--inplace")
955 (invoke "python" "-m" "pytest"
956 "--pyargs" "astropy_healpix")))))))
957 (native-inputs
958 (list python-extension-helpers
959 python-hypothesis
960 python-pytest-astropy
961 python-setuptools-scm))
962 (propagated-inputs
963 (list python-astropy python-numpy))
964 (home-page "https://github.com/astropy/astropy-healpix")
965 (synopsis "HEALPix for Astropy")
966 (description "This package provides HEALPix to the Astropy project.")
967 (license license:bsd-3)))
968
969 (define-public python-astroquery
970 (package
971 (name "python-astroquery")
972 (version "0.4.6")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "astroquery" version))
977 (sha256
978 (base32 "1vhkzsqlgn3ji5by2rdf2gwklhbyzvpzb1iglalhqjkkrdaaaz1h"))))
979 (build-system python-build-system)
980 (arguments
981 `(#:phases
982 (modify-phases %standard-phases
983 (add-before 'check 'writable-home
984 (lambda _ ; some tests need a writable home
985 (setenv "HOME" (getcwd))))
986 (replace 'check
987 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
988 (when tests?
989 (add-installed-pythonpath inputs outputs)
990 (invoke "python" "-m" "pytest" "--pyargs" "astroquery"
991 ;; Skip tests that require online data.
992 "-m" "not remote_data")))))))
993 (propagated-inputs
994 (list python-astropy
995 python-beautifulsoup4
996 python-html5lib
997 python-keyring
998 python-numpy
999 python-pyvo
1000 python-requests))
1001 (native-inputs
1002 (list python-flask
1003 python-jinja2
1004 python-matplotlib
1005 python-pytest-astropy
1006 python-pytest-dependency))
1007 (home-page "https://www.astropy.org/astroquery/")
1008 (synopsis "Access online astronomical data resources")
1009 (description "Astroquery is a package that contains a collection of tools
1010 to access online Astronomical data. Each web service has its own sub-package.")
1011 (license license:bsd-3)))
1012
1013 (define-public python-cdflib
1014 (package
1015 (name "python-cdflib")
1016 (version "0.4.4")
1017 (source
1018 (origin
1019 (method git-fetch) ; no tests in pypi archive
1020 (uri (git-reference
1021 (url "https://github.com/MAVENSDC/cdflib")
1022 (commit version)))
1023 (file-name (git-file-name name version))
1024 (sha256
1025 (base32 "1h7750xvr6qbhnl2w3bhccs3pwp3hci3624pvvxym0yjinmskjlz"))))
1026 (build-system python-build-system)
1027 (arguments
1028 (list #:phases
1029 #~(modify-phases %standard-phases
1030 (replace 'check
1031 (lambda* (#:key tests? #:allow-other-keys)
1032 (when tests?
1033 (setenv "HOME" (getcwd))
1034 (invoke "pytest" "-vv" "tests")))))))
1035 (propagated-inputs
1036 (list python-attrs python-numpy))
1037 (native-inputs
1038 (list python-astropy
1039 python-hypothesis
1040 python-pytest
1041 python-pytest-cov
1042 python-pytest-remotedata
1043 python-xarray))
1044 (home-page "https://github.com/MAVENSDC/cdflib")
1045 (synopsis "Python library to deal with NASA's CDF astronmical data format")
1046 (description "This package provides a Python CDF reader toolkit
1047 It provides the following functionality:
1048 @itemize
1049 @item Ability to read variables and attributes from CDF files
1050 @item Writes CDF version 3 files
1051 @item Can convert between CDF time types (EPOCH/EPOCH16/TT2000) to other common
1052 time formats
1053 @item Can convert CDF files into XArray Dataset objects and vice versa,
1054 attempting to maintain ISTP compliance
1055 @end itemize\n")
1056 (license license:expat)))
1057
1058 (define-public python-ephem
1059 (package
1060 (name "python-ephem")
1061 (version "4.1.3")
1062 (source (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "ephem" version))
1065 (sha256
1066 (base32
1067 "0smmm3l8csnw9rrimh8mpyjrm80jaafjl184spnji98vk22qd8bz"))))
1068 (build-system python-build-system)
1069 (native-inputs (list tzdata))
1070 (home-page "https://rhodesmill.org/pyephem/")
1071 (synopsis "Compute positions of the planets and stars")
1072 (description
1073 "PyEphem provides an @code{ephem} Python package for performing
1074 high-precision astronomy computations.
1075
1076 The name ephem is short for the word ephemeris, which is the traditional term
1077 for a table giving the position of a planet, asteroid, or comet for a series
1078 of dates.")
1079 (license license:expat)))
1080
1081 (define-public python-photutils
1082 (package
1083 (name "python-photutils")
1084 (version "1.3.0")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri (pypi-uri "photutils" version))
1089 (sha256
1090 (base32 "1a8djakaya6w5iv9237gkcz39brqzgrfs2wqrl0izi1s85cfdymn"))))
1091 (build-system python-build-system)
1092 (arguments
1093 `(#:test-target "pytest"
1094 #:phases
1095 (modify-phases %standard-phases
1096 ;; This file is opened in both install and check phases.
1097 (add-before 'install 'writable-compiler
1098 (lambda _ (make-file-writable "photutils/_compiler.c")))
1099 (add-before 'check 'writable-compiler
1100 (lambda _ (make-file-writable "photutils/_compiler.c"))))))
1101 (propagated-inputs
1102 (list python-astropy python-numpy))
1103 (native-inputs
1104 (list python-cython
1105 python-extension-helpers
1106 python-pytest-astropy
1107 python-pytest-runner
1108 python-setuptools-scm))
1109 (home-page "https://github.com/astropy/photutils")
1110 (synopsis "Source detection and photometry")
1111 (description "Photutils is an Astropy package for detection and photometry
1112 of astronomical sources.")
1113 (license license:bsd-3)))
1114
1115 (define-public python-pyvo
1116 (package
1117 (name "python-pyvo")
1118 (version "1.2.1")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (pypi-uri "pyvo" version))
1123 (sha256
1124 (base32 "1ri5yp6903386lkn79mdcmlax7zsfrrrjbcvb91wxydcc9yasc1n"))))
1125 (build-system python-build-system)
1126 (arguments
1127 '(#:phases
1128 (modify-phases %standard-phases
1129 (replace 'check
1130 (lambda* (#:key tests? #:allow-other-keys)
1131 (when tests?
1132 (invoke "python" "-m" "pytest" "--pyargs" "pyvo" "-k"
1133 (string-append ; these tests use the network
1134 "not test_access_with_string"
1135 " and not test_access_with_list"
1136 " and not test_access_with_expansion"))))))))
1137 (native-inputs
1138 (list python-pytest-astropy python-requests-mock))
1139 (propagated-inputs
1140 (list python-astropy python-mimeparse python-pillow python-requests))
1141 (home-page "https://github.com/astropy/pyvo")
1142 (synopsis "Access Virtual Observatory data and services")
1143 (description
1144 "PyVO is a package providing access to remote data and services of the
1145 Virtual observatory (VO) using Python.")
1146 (license license:bsd-3)))
1147
1148 (define-public python-regions
1149 (package
1150 (name "python-regions")
1151 (version "0.5")
1152 (source
1153 (origin
1154 (method url-fetch)
1155 (uri (pypi-uri "regions" version))
1156 (sha256
1157 (base32 "1bjrcjchbw3xw1a26d5g198lh7vxpp9m5sal58r7f8mmr1d8g2dc"))))
1158 (build-system python-build-system)
1159 (arguments
1160 `(#:test-target "pytest"
1161 #:phases
1162 (modify-phases %standard-phases
1163 ;; This doctest requires online data.
1164 (add-after 'unpack 'delete-doctest
1165 (lambda _ (delete-file "docs/masks.rst")))
1166 ;; This file is opened in both install and check phases.
1167 (add-before 'install 'writable-compiler
1168 (lambda _ (make-file-writable "regions/_compiler.c")))
1169 (add-before 'check 'writable-compiler
1170 (lambda _ (make-file-writable "regions/_compiler.c")))
1171 (add-before 'check 'writable-home
1172 (lambda _ (setenv "HOME" (getcwd)))))))
1173 (propagated-inputs
1174 (list python-astropy python-numpy))
1175 (native-inputs
1176 (list python-cython
1177 python-extension-helpers
1178 python-pytest-arraydiff
1179 python-pytest-astropy
1180 python-pytest-runner
1181 python-setuptools-scm))
1182 (home-page "https://github.com/astropy/regions")
1183 (synopsis "Package for region handling")
1184 (description "Regions is an Astropy package for region handling.")
1185 (license license:bsd-3)))
1186
1187 (define-public python-astral
1188 (package
1189 (name "python-astral")
1190 (version "2.2")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "astral" version))
1195 (sha256
1196 (base32 "1gkggdibccmdy9glymw3kbrkzm6svvsg0lk56hhy92y4smkrj7g4"))))
1197 (build-system python-build-system)
1198 (arguments
1199 `(#:phases
1200 (modify-phases %standard-phases
1201 (replace 'check
1202 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1203 (when tests?
1204 (add-installed-pythonpath inputs outputs)
1205 (invoke "python" "-m" "pytest")))))))
1206 (native-inputs
1207 (list python-freezegun python-setuptools-scm))
1208 (propagated-inputs
1209 (list python-dataclasses python-pytest python-pytz))
1210 (home-page "https://github.com/sffjunkie/astral")
1211 (synopsis "Calculations for the position of the sun and moon")
1212 (description "Astral is a Python module that calculates times for various
1213 positions of the sun: dawn, sunrise, solar noon, sunset, dusk, solar
1214 elevation, solar azimuth, rahukaalam, and the phases of the moon.")
1215 (license license:asl2.0)))
1216
1217 (define-public libnova
1218 (package
1219 (name "libnova")
1220 (version "0.16")
1221 (source
1222 (origin
1223 (method git-fetch)
1224 (uri (git-reference
1225 (url "https://git.code.sf.net/p/libnova/libnova.git")
1226 (commit (string-append "v" version))))
1227 (file-name (git-file-name name version))
1228 (sha256
1229 (base32
1230 "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b"))))
1231 (build-system gnu-build-system)
1232 (arguments
1233 `(#:phases
1234 (modify-phases %standard-phases
1235 (add-after 'unpack 'patch-git-version
1236 (lambda _
1237 (substitute* "./git-version-gen"
1238 (("/bin/sh") (which "sh")))
1239 #t)))))
1240 (native-inputs
1241 (list autoconf automake libtool))
1242 (synopsis "Celestial mechanics, astrometry and astrodynamics library")
1243 (description "Libnova is a general purpose, double precision, Celestial
1244 Mechanics, Astrometry and Astrodynamics library.")
1245 (home-page "http://libnova.sourceforge.net/")
1246 (license (list license:lgpl2.0+
1247 license:gpl2+)))) ; examples/transforms.c & lntest/*.c
1248
1249 (define-public libsep
1250 (package
1251 (name "libsep")
1252 (version "1.2.1")
1253 (source
1254 (origin
1255 (method git-fetch)
1256 (uri (git-reference
1257 (url "https://github.com/kbarbary/sep")
1258 (commit (string-append "v" version))))
1259 (file-name (git-file-name name version))
1260 (sha256
1261 (base32 "0sag96am6r1ffh9860yq40js874362v3132ahlm6sq7padczkicf"))))
1262 (build-system cmake-build-system)
1263 (arguments
1264 (list
1265 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1266 (string-append "PREFIX=" #$output))
1267 #:phases #~(modify-phases %standard-phases
1268 (replace 'check
1269 (lambda* (#:key tests? #:allow-other-keys)
1270 (when tests?
1271 (chdir "../source")
1272 (invoke "make"
1273 (string-append "CC=" #$(cc-for-target))
1274 "test")))))))
1275 (native-inputs
1276 (list python-wrapper))
1277 (home-page "https://github.com/kbarbary/sep")
1278 (synopsis "Astronomical source extraction and photometry library")
1279 (description
1280 "SEP makes the core algorithms of
1281 @url{https://www.astromatic.net/software/sextractor/, sextractor} available as a
1282 library of stand-alone functions and classes. These operate directly on
1283 in-memory arrays (no FITS files or configuration files). The code is derived
1284 from the Source Extractor code base (written in C) and aims to produce results
1285 compatible with Source Extractor whenever possible. SEP consists of a C library
1286 with no dependencies outside the standard library, and a Python module that
1287 wraps the C library in a Pythonic API. The Python wrapper operates on NumPy
1288 arrays with NumPy as its only dependency.")
1289 (license (list license:expat license:lgpl3+ license:bsd-3))))
1290
1291 (define-public libskry
1292 (package
1293 (name "libskry")
1294 (version "0.3.0")
1295 (source
1296 (origin
1297 (method git-fetch)
1298 (uri (git-reference
1299 (url "https://github.com/GreatAttractor/libskry")
1300 (commit (string-append "v" version))))
1301 (file-name (git-file-name name version))
1302 (sha256
1303 (base32 "14kwng0j8wqzlb0gqg3ayq36l15dpz7kvxc56fa47j55b376bwh6"))))
1304 (build-system gnu-build-system)
1305 (arguments
1306 `(#:make-flags
1307 (list
1308 (string-append
1309 "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
1310 #:phases
1311 (modify-phases %standard-phases
1312 (delete 'configure) ;; no configure provided
1313 (delete 'check) ;; no tests provided
1314 (replace 'install
1315 ;; The Makefile lacks an ‘install’ target.
1316 (lambda* (#:key outputs #:allow-other-keys)
1317 (let* ((out (assoc-ref outputs "out"))
1318 (lib (string-append out "/lib"))
1319 (include (string-append out "/include")))
1320 (copy-recursively "bin" lib)
1321 (copy-recursively "include" include))
1322 #t)))))
1323 (inputs
1324 (list ffmpeg))
1325 (home-page "https://github.com/GreatAttractor/libskry")
1326 (synopsis "Astronimical lucky imaging library")
1327 (description
1328 "@code{libskry} implements the lucky imaging principle of astronomical
1329 imaging: creating a high-quality still image out of a series of many thousands)
1330 low quality ones")
1331 (license license:gpl3+)))
1332
1333 (define-public libpasastro
1334 ;; NOTE: (Sharlatan-20210122T215921+0000): the version tag has a build
1335 ;; error on spice which is resolved with the latest commit.
1336 (let ((commit "e3c218d1502a18cae858c83a9a8812ab197fcb60")
1337 (revision "1"))
1338 (package
1339 (name "libpasastro")
1340 (version (git-version "1.4.0" revision commit))
1341 (source (origin
1342 (method git-fetch)
1343 (uri (git-reference
1344 (url "https://github.com/pchev/libpasastro")
1345 (commit commit)))
1346 (file-name (git-file-name name version))
1347 (sha256
1348 (base32
1349 "0asp2sn34nds5va2ghppwc41vb6j3d1mf049j949rgrll817kx47"))))
1350 (build-system gnu-build-system)
1351 (arguments
1352 `(#:tests? #f
1353 #:make-flags
1354 (list
1355 ,(match (or (%current-target-system) (%current-system))
1356 ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
1357 "OS_TARGET=linux")
1358 (_ #f))
1359 ,(match (or (%current-target-system) (%current-system))
1360 ("i686-linux" "CPU_TARGET=i386")
1361 ("x86_64-linux" "CPU_TARGET=x86_64")
1362 ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
1363 (_ #f))
1364 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1365 #:phases
1366 (modify-phases %standard-phases
1367 (delete 'configure))))
1368 (home-page "https://github.com/pchev/libpasastro")
1369 (synopsis "Interface to astronomy library for use from Pascal program")
1370 (description
1371 "This package provides shared libraries to interface Pascal program with
1372 standard astronomy libraries:
1373
1374 @itemize
1375 @item @code{libpasgetdss.so}: Interface with GetDSS to work with DSS images.
1376 @item @code{libpasplan404.so}: Interface with Plan404 to compute planets position.
1377 @item @code{libpaswcs.so}: Interface with libwcs to work with FITS WCS.
1378 @item @code{libpasspice.so}: To work with NAIF/SPICE kernel.
1379 @end itemize\n")
1380 (license license:gpl2+))))
1381
1382 (define-public missfits
1383 (package
1384 (name "missfits")
1385 (version "2.8.0")
1386 (source
1387 (origin
1388 (method url-fetch)
1389 (uri (string-append "https://www.astromatic.net/download/missfits/"
1390 "missfits-" version ".tar.gz"))
1391 (sha256
1392 (base32 "04jrd7fsvzr14vdmwgj2f6v97gdcfyjyz6jppml3ghr9xh12jxv5"))))
1393 (build-system gnu-build-system)
1394 (home-page "https://www.astromatic.net/software/missfits")
1395 (synopsis "FITS files Maintenance program")
1396 (description
1397 "MissFITS is a program that performs basic maintenance and packaging tasks
1398 on FITS files:
1399
1400 @itemize
1401 @item add/edit FITS header keywords
1402 @item split/join Multi-Extension-FITS (MEF) files
1403 @item unpack/pack FITS data-cubes
1404 @item create/check/update FITS checksums, using R. Seaman's protocol
1405 (see http://www.adass.org/adass/proceedings/adass94/seamanr.html)
1406 @end itemize\n")
1407 (license license:gpl3+)))
1408
1409 (define-public xplanet
1410 (package
1411 (name "xplanet")
1412 (version "1.3.1")
1413 (source
1414 (origin
1415 (method url-fetch)
1416 (uri
1417 (string-append
1418 "mirror://sourceforge/xplanet/xplanet/"
1419 version "/xplanet-" version ".tar.gz"))
1420 (sha256
1421 (base32 "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023"))
1422 (patches
1423 (search-patches
1424 "xplanet-1.3.1-cxx11-eof.patch"
1425 "xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch"
1426 "xplanet-1.3.1-libimage_gif.c.patch"
1427 "xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch"))))
1428 (build-system gnu-build-system)
1429 (native-inputs
1430 (list pkg-config))
1431 (inputs
1432 `(("libx11" ,libx11)
1433 ("libxscrnsaver" ,libxscrnsaver)
1434 ("libice" ,libice)
1435 ("freetype" ,freetype)
1436 ("pango" ,pango)
1437 ("giflib" ,giflib)
1438 ("libjpeg" ,libjpeg-turbo)
1439 ("libpng" ,libpng)
1440 ("libtiff" ,libtiff)
1441 ("netpbm" ,netpbm)
1442 ("zlib" ,zlib)))
1443 (arguments
1444 `(#:configure-flags
1445 (let ((netpbm (assoc-ref %build-inputs "netpbm")))
1446 (append (list
1447 ;; Give correct path for pnm.h header to configure script
1448 (string-append "CPPFLAGS=-I" netpbm "/include/netpbm")
1449 ;; no nasa jpl cspice support
1450 "--without-cspice" )))))
1451 (home-page "http://xplanet.sourceforge.net/")
1452 (synopsis "Planetary body renderer")
1453 (description
1454 "Xplanet renders an image of a planet into an X window or file.
1455 All of the major planets and most satellites can be drawn and different map
1456 projections are also supported, including azimuthal, hemisphere, Lambert,
1457 Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
1458 (license license:gpl2+)))
1459
1460 (define-public gpredict
1461 (package
1462 (name "gpredict")
1463 (version "2.2.1")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (string-append "https://github.com/csete/gpredict/releases"
1468 "/download/v" version
1469 "/gpredict-" version ".tar.bz2"))
1470 (sha256
1471 (base32 "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"))))
1472 (build-system gnu-build-system)
1473 (native-inputs
1474 `(("intltool" ,intltool)
1475 ("gettext" ,gettext-minimal)
1476 ("pkg-config" ,pkg-config)))
1477 (inputs
1478 (list curl glib goocanvas gtk+))
1479 (arguments
1480 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
1481 #:phases
1482 (modify-phases %standard-phases
1483 (add-after 'unpack 'fix-tests
1484 (lambda _
1485 ;; Remove reference to non-existent file.
1486 (substitute* "po/POTFILES.in"
1487 (("src/gtk-sat-tree\\.c")
1488 ""))
1489 #t)))))
1490 (synopsis "Satellite tracking and orbit prediction application")
1491 (description
1492 "Gpredict is a real-time satellite tracking and orbit prediction
1493 application. It can track a large number of satellites and display their
1494 position and other data in lists, tables, maps, and polar plots (radar view).
1495 Gpredict can also predict the time of future passes for a satellite, and
1496 provide you with detailed information about each pass.")
1497 (home-page "http://gpredict.oz9aec.net/index.php")
1498 (license license:gpl2+)))
1499
1500 (define-public sgp4
1501 ;; No tagged releases, use commit directly.
1502 (let ((commit "ca9d4d97af4ee62461de6f13e0c85d1dc6000040")
1503 (revision "1"))
1504 (package
1505 (name "sgp4")
1506 (version (git-version "0.0.0" revision commit))
1507 (source
1508 (origin
1509 (method git-fetch)
1510 (uri (git-reference
1511 (url "https://github.com/dnwrnr/sgp4")
1512 (commit commit)))
1513 (file-name (git-file-name name version))
1514 (sha256
1515 (base32 "1xwfa6papmd2qz5w0hwzvijmzvp9np8dlw3q3qz4bmsippzjv8p7"))))
1516 (build-system cmake-build-system)
1517 (arguments
1518 `(#:phases
1519 (modify-phases %standard-phases
1520 (replace 'check
1521 (lambda _
1522 ;; Tests fails, probably because of a few "(e <= -0.001)" errors.
1523 ;; Or maybe this is not the right way to run the tests?
1524 ;; (invoke "runtest/runtest")
1525 #t)))))
1526 (home-page "https://github.com/dnwrnr/sgp4")
1527 (synopsis "Simplified perturbations models library")
1528 (description
1529 "This is a library implementing the simplified perturbations model.
1530 It can be used to calculate the trajectory of satellites.")
1531 (license license:asl2.0))))
1532
1533 (define-public imppg
1534 (package
1535 (name "imppg")
1536 (version "0.6.4")
1537 (source
1538 (origin
1539 (method git-fetch)
1540 (uri (git-reference
1541 (url "https://github.com/GreatAttractor/imppg")
1542 (commit (string-append "v" version))))
1543 (file-name (git-file-name name version))
1544 (sha256
1545 (base32 "04synbmyz0hkipl1cdc26nr42r57v494yjw8pi4jx0jrxrawgj9h"))))
1546 (build-system cmake-build-system)
1547 (arguments
1548 `(#:tests? #f ;no test provided
1549 #:phases
1550 (modify-phases %standard-phases
1551 (replace 'configure
1552 (lambda* (#:key outputs #:allow-other-keys)
1553 (mkdir-p "build")
1554 (chdir "build")
1555 (invoke
1556 "cmake"
1557 "-G" "Unix Makefiles"
1558 "-DCMAKE_BUILD_TYPE=Release"
1559 (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref outputs "out"))
1560 ".."))))))
1561 (native-inputs
1562 (list boost pkg-config))
1563 (inputs
1564 (list cfitsio freeimage glew wxwidgets))
1565 (home-page "https://github.com/GreatAttractor/imppg")
1566 (synopsis "Astronomical Image Post-Proccessor (ImPPG)")
1567 (description
1568 "ImPPG performs Lucy-Richardson deconvolution, unsharp masking,
1569 brightness normalization and tone curve adjustment. It can also apply
1570 previously specified processing settings to multiple images. All operations
1571 are performed using 32-bit floating-point arithmetic.
1572
1573 Supported input formats: FITS, BMP, JPEG, PNG, TIFF (most of bit depths and
1574 compression methods), TGA and more. Images are processed in grayscale and can
1575 be saved as: BMP 8-bit; PNG 8-bit; TIFF 8-bit, 16-bit, 32-bit
1576 floating-point (no compression, LZW- or ZIP-compressed), FITS 8-bit, 16-bit,
1577 32-bit floating-point.")
1578 (license license:gpl3+)))
1579
1580 (define-public indi
1581 (package
1582 (name "indi")
1583 (version "1.9.3")
1584 (source
1585 (origin
1586 (method git-fetch)
1587 (uri (git-reference
1588 (url "https://github.com/indilib/indi")
1589 (commit (string-append "v" version))))
1590 (file-name (git-file-name name version))
1591 (sha256
1592 (base32 "0c7md288d3g2vf0m1ai6x2l4j4rmlasc4rya92phvd4ynf8vcki2"))))
1593 (build-system cmake-build-system)
1594 (arguments
1595 `(#:configure-flags
1596 (let ((out (assoc-ref %outputs "out")))
1597 (list
1598 "-DINDI_BUILD_UNITTESTS=ON"
1599 "-DCMAKE_BUILD_TYPE=Release"
1600 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1601 (string-append "-DUDEVRULES_INSTALL_DIR=" out "/lib/udev/rules.d")))
1602 #:phases
1603 (modify-phases %standard-phases
1604 (replace 'check
1605 (lambda* (#:key tests? #:allow-other-keys)
1606 (when tests?
1607 (with-directory-excursion "test"
1608 (invoke "ctest")))))
1609 (add-before 'install 'set-install-directories
1610 (lambda* (#:key outputs #:allow-other-keys)
1611 (let ((out (assoc-ref outputs "out")))
1612 (mkdir-p (string-append out "/lib/udev/rules.d"))))))))
1613 (native-inputs
1614 (list googletest))
1615 (inputs
1616 (list cfitsio
1617 curl
1618 fftw
1619 gsl
1620 libjpeg-turbo
1621 libnova
1622 libtiff
1623 libusb
1624 zlib))
1625 (home-page "https://www.indilib.org")
1626 (synopsis "Library for astronimical intrumentation control")
1627 (description
1628 "INDI (Instrument-Neutral Device Interface) is a distributed XML-based
1629 control protocol designed to operate astronomical instrumentation. INDI is
1630 small, flexible, easy to parse, scalable, and stateless. It supports common
1631 DCS functions such as remote control, data acquisition, monitoring, and a lot
1632 more.")
1633 (license (list license:bsd-3
1634 license:gpl2+
1635 license:lgpl2.0+
1636 license:lgpl2.1+))))
1637
1638 (define-public sunclock
1639 (let ((commit "f4106eb0a81f7594726d6b2859efd8fc64cc1225")
1640 (revision "1"))
1641 (package
1642 (name "sunclock")
1643 (version (git-version "3.57" revision commit))
1644 (source
1645 (origin
1646 (method git-fetch)
1647 (uri (git-reference
1648 (url "https://github.com/nongiach/Sunclock")
1649 (commit commit)))
1650 (file-name (git-file-name name version))
1651 (sha256
1652 (base32 "1rczdpmhvfw57b9r793vq8vqlbdhlkgj52fxwrdfl6cwj95a9kv2"))))
1653 (build-system gnu-build-system)
1654 (arguments
1655 `(#:make-flags
1656 (list (string-append "DESTDIR=" %output)
1657 ;; Fix incorrect argument given to gcc. Error message:
1658 ;; "gcc: error: DefaultGcc2AMD64Opt: No such file or directory"
1659 "CDEBUGFLAGS=")
1660 #:phases
1661 (modify-phases %standard-phases
1662 (replace 'configure
1663 (lambda _
1664 (chdir "sunclock-3.57")
1665 (substitute* "Imakefile"
1666 (("^MANDIR=/X11R6/man/man1")
1667 "MANDIR=/share/man/man1")
1668 (("^BINDIR=/X11R6/bin")
1669 "BINDIR=/bin")
1670 ;; Disable ZLIB support for vmf files because zlib implements
1671 ;; `gzgetc` as a macro instead of a function, which results in
1672 ;; a compilation error.
1673 ((" -DZLIB") "")
1674 ((" -lz") "")
1675 (("cd \\$\\(DESTDIR\\)\\$\\(SHAREDIR\\)/earthmaps/vmf ; \
1676 gzip -f \\*.vmf")
1677 ""))
1678 ;; Generate Makefile.
1679 (invoke "xmkmf"))))
1680 #:tests? #f)) ; No check target.
1681 (inputs
1682 (list libjpeg-turbo libpng libx11 libxpm))
1683 (native-inputs
1684 (list imake))
1685 (home-page "https://github.com/nongiach/Sunclock")
1686 (synopsis
1687 "Map of the Earth that shows which portion is illuminated by the Sun")
1688 (description
1689 "Sunclock displays a map of the Earth and shows which portion is
1690 illuminated by the Sun. It can commute between two states, the \"clock window\"
1691 and the \"map window\". The clock window displays a small map of the Earth and
1692 therefore occupies little space on the screen, while the \"map window\" displays
1693 a large map and offers more advanced functions: local time of cities, Sun and
1694 Moon position, etc.")
1695 (license license:gpl2+))))
1696
1697 (define-public python-jplephem
1698 (package
1699 (name "python-jplephem")
1700 (version "2.17")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "jplephem" version))
1705 (sha256
1706 (base32 "09xaibxnwbzzs3x9g3ibqa2la17z3r6in93321glh02dbibfbip1"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:phases
1710 (modify-phases %standard-phases
1711 (replace 'check
1712 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1713 (when tests?
1714 (let ((out (assoc-ref outputs "out")))
1715 (add-installed-pythonpath inputs outputs)
1716 (setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
1717 (invoke "python" "-m" "unittest" "discover" "-s" "test"))))))))
1718 (inputs
1719 (list python-numpy))
1720 (home-page "https://github.com/brandon-rhodes/python-jplephem")
1721 (synopsis "Python version of NASA DE4xx ephemerides")
1722 (description
1723 "The package is a Python implementation of the mathematics that standard
1724 JPL ephemerides use to predict raw (x,y,z) planetary positions.")
1725 (license license:expat)))
1726
1727 (define-public python-pyerfa
1728 (package
1729 (name "python-pyerfa")
1730 (version "2.0.0.1")
1731 (source
1732 (origin
1733 (method url-fetch)
1734 (uri (pypi-uri "pyerfa" version))
1735 (sha256
1736 (base32 "0c6y1rm51kj8ahbr1vwbswck3ix77dc3zhc2fkg6w7iczrzn7m1g"))
1737 (modules '((guix build utils)))
1738 (snippet
1739 '(begin
1740 ;; Remove bundled submodule library.
1741 (delete-file-recursively "liberfa")
1742 #t))))
1743 (build-system python-build-system)
1744 (arguments
1745 `(#:phases
1746 (modify-phases %standard-phases
1747 (add-before 'build 'use-system-liberfa
1748 (lambda _
1749 (setenv "PYERFA_USE_SYSTEM_LIBERFA" "1"))))))
1750 (native-inputs
1751 (list python-pytest-doctestplus python-pytest python-setuptools-scm))
1752 (inputs
1753 (list erfa))
1754 (propagated-inputs
1755 (list python-numpy))
1756 (home-page "https://github.com/liberfa/pyerfa")
1757 (synopsis "Python bindings for ERFA")
1758 (description
1759 "PyERFA is the Python wrapper for the ERFA library (Essential
1760 Routines for Fundamental Astronomy), a C library containing key algorithms for
1761 astronomy, which is based on the SOFA library published by the International
1762 Astronomical Union (IAU). All C routines are wrapped as Numpy universal
1763 functions, so that they can be called with scalar or array inputs.")
1764 (license license:bsd-3)))
1765
1766 (define-public python-pynbody
1767 (package
1768 (name "python-pynbody")
1769 (version "1.2.3")
1770 (source
1771 (origin
1772 (method url-fetch)
1773 (uri (pypi-uri "pynbody" version))
1774 (sha256
1775 (base32 "1jxwk2s4qz1znvyak2lj7ld01kl1jh87xp81ki7a8dz1gcy93fkx"))))
1776 (build-system python-build-system)
1777 (arguments
1778 (list #:phases
1779 #~(modify-phases %standard-phases
1780 (add-after 'unpack 'disable-tests-require-testdata
1781 (lambda _
1782 ;; Disable tests which need to download additional 1.0GiB+
1783 ;; of test data archive from
1784 ;; http://star.ucl.ac.uk/~app/testdata.tar.gz
1785 ;; https://github.com/pynbody/pynbody/blob/ \
1786 ;; f4bd482dc47532831b3ec115c7cb07149d61bfc5/ \
1787 ;; .github/workflows/build-test.yaml#L41
1788 (with-directory-excursion "tests"
1789 (for-each delete-file
1790 '("gravity_test.py"
1791 "adaptahop_test.py"
1792 "ahf_halos_test.py"
1793 "array_test.py"
1794 "bridge_test.py"
1795 "family_test.py"
1796 "partial_tipsy_test.py"
1797 "snapshot_test.py"
1798 "test_profile.py"
1799 "gadget_test.py"
1800 "gadgethdf_test.py"
1801 "grafic_test.py"
1802 "halotools_test.py"
1803 "nchilada_test.py"
1804 "ramses_new_ptcl_format_test.py"
1805 "ramses_test.py"
1806 "rockstar_test.py"
1807 "sph_image_test.py"
1808 "sph_smooth_test.py"
1809 "subfind_test.py"
1810 "subfindhdf_gadget4_test.py"
1811 "tipsy_test.py")))))
1812 (replace 'check
1813 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1814 (when tests?
1815 (add-installed-pythonpath inputs outputs)
1816 (setenv "HOME" "/tmp")
1817 (invoke "pytest" "-vv")))))))
1818 (native-inputs
1819 (list python-cython
1820 python-pandas
1821 python-pytest))
1822 (propagated-inputs
1823 (list python-h5py
1824 python-matplotlib
1825 python-numpy
1826 python-posix-ipc
1827 python-scipy))
1828 (home-page "https://pynbody.github.io/pynbody/index.html")
1829 (synopsis "Light-weight astronomical N-body/SPH analysis for python")
1830 (description "@code{Pynbody} is an analysis framework for N-body and hydrodynamic
1831 astrophysical simulations supporting PKDGRAV/Gasoline, Gadget, Gadget4/Arepo,
1832 N-Chilada and RAMSES AMR outputs.")
1833 (license license:gpl3+)))
1834
1835 (define-public python-sep
1836 (package
1837 (inherit libsep)
1838 (name "python-sep")
1839 (build-system python-build-system)
1840 (arguments
1841 (strip-keyword-arguments
1842 '(#:make-flags) (package-arguments libsep)))
1843 (native-inputs
1844 (modify-inputs (package-inputs libsep)
1845 (prepend python-cython)))
1846 (propagated-inputs
1847 (modify-inputs (package-inputs libsep)
1848 (prepend python-numpy)))))
1849
1850 (define-public python-suntime
1851 (package
1852 (name "python-suntime")
1853 (version "1.2.5")
1854 (source (origin
1855 (method url-fetch)
1856 (uri (pypi-uri "suntime" version))
1857 (sha256
1858 (base32
1859 "0ja64w293wjx76q3z18ikx4rdihwkbj6pnjpbs82ycyyzhfnbpz4"))))
1860 (build-system python-build-system)
1861 (propagated-inputs (list python-dateutil))
1862 (home-page "https://github.com/SatAgro/suntime")
1863 (synopsis "Sunset and sunrise time calculation python library")
1864 (description
1865 "Python library doing sunrise and sunset time calculation.
1866
1867 Takes a WGS84 (GPS) latitude/longitude as input as well as an UTC or local
1868 datetime object.")
1869 (license license:lgpl3+)))
1870
1871 (define-public python-asdf
1872 (package
1873 (name "python-asdf")
1874 (version "2.8.3")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "asdf" version))
1879 (sha256
1880 (base32 "0i4vq1hsympjgb1yvn4ql0gm8j1mki9ggmj03533kmg0nbzp03yy"))))
1881 (build-system python-build-system)
1882 (arguments
1883 ;; NOTE: (Sharlatan-20211229T201059+0000): Tests depend on astropy and
1884 ;; gwcs, astropy gwcs depend on asdf. Disable circular dependence.
1885 `(#:tests? #f))
1886 (native-inputs
1887 (list python-setuptools-scm
1888 python-semantic-version
1889 python-packaging))
1890 (propagated-inputs
1891 (list python-importlib-resources
1892 python-jsonschema
1893 python-jmespath
1894 python-numpy
1895 python-pyyaml))
1896 (home-page "https://github.com/asdf-format/asdf")
1897 (synopsis "Python tools to handle ASDF files")
1898 (description
1899 "The Advanced Scientific Data Format (ASDF) is a next-generation
1900 interchange format for scientific data. This package contains the Python
1901 implementation of the ASDF Standard.")
1902 (license license:bsd-3)))
1903
1904 (define python-asdf-transform-schemas
1905 (package
1906 (name "python-asdf-transform-schemas")
1907 (version "0.2.0")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "asdf_transform_schemas" version))
1912 (sha256
1913 (base32 "1gmzd81hw4ppsvzrc91wcbjpcw9hhv9gavllv7nyi7qjb54c837g"))))
1914 (build-system python-build-system)
1915 (arguments
1916 `(#:phases
1917 (modify-phases %standard-phases
1918 (replace 'check
1919 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1920 (when tests?
1921 (add-installed-pythonpath inputs outputs)
1922 (invoke "python" "-m" "pytest")))))))
1923 (native-inputs
1924 (list python-pytest
1925 python-semantic-version
1926 python-setuptools-scm))
1927 (propagated-inputs
1928 (list python-asdf))
1929 (home-page "https://github.com/asdf-format/asdf-transform-schemas")
1930 (synopsis "ASDF schemas for transforms")
1931 (description
1932 "This package provides ASDF schemas for validating transform tags. Users
1933 should not need to install this directly; instead, install an implementation
1934 package such as asdf-astropy.")
1935 (license license:bsd-3)))
1936
1937 (define python-asdf-coordinates-schemas
1938 (package
1939 (name "python-asdf-coordinates-schemas")
1940 (version "0.1.0")
1941 (source
1942 (origin
1943 (method url-fetch)
1944 (uri (pypi-uri "asdf_coordinates_schemas" version))
1945 (sha256
1946 (base32 "0ahwhsz5jzljnpkfd2kvspirg823lnj5ip9sfkd9cx09z1nlz8jg"))))
1947 (build-system python-build-system)
1948 (arguments
1949 `(#:phases
1950 (modify-phases %standard-phases
1951 (replace 'check
1952 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1953 (when tests?
1954 (add-installed-pythonpath inputs outputs)
1955 (invoke "python" "-m" "pytest")))))))
1956 (native-inputs
1957 (list python-pytest
1958 python-semantic-version
1959 python-setuptools-scm))
1960 (propagated-inputs
1961 (list python-asdf))
1962 (home-page "https://github.com/asdf-format/asdf-coordinates-schemas")
1963 (synopsis "ASDF coordinates schemas")
1964 (description "This package provides ASDF schemas for validating
1965 coordinates tags. Users should not need to install this directly; instead,
1966 install an implementation package such as asdf-astropy.")
1967 (license license:bsd-3)))
1968
1969 (define-public python-asdf-astropy
1970 (package
1971 (name "python-asdf-astropy")
1972 (version "0.1.2")
1973 (source
1974 (origin
1975 (method url-fetch)
1976 (uri (pypi-uri "asdf_astropy" version))
1977 (sha256
1978 (base32 "0bzgah7gskvnz6jcrzipvzixv8k2jzjkskqwxngzwp4nxgjbcvi4"))))
1979 (build-system python-build-system)
1980 (arguments
1981 `(#:phases
1982 (modify-phases %standard-phases
1983 (replace 'check
1984 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1985 (when tests?
1986 (add-installed-pythonpath inputs outputs)
1987 (invoke "python" "-m" "pytest")))))))
1988 (native-inputs
1989 (list python-coverage
1990 python-h5py
1991 python-matplotlib
1992 python-pandas
1993 python-pytest-astropy
1994 python-scipy
1995 python-semantic-version
1996 python-setuptools-scm))
1997 (propagated-inputs
1998 (list python-asdf
1999 python-asdf-coordinates-schemas
2000 python-asdf-transform-schemas
2001 python-astropy
2002 python-numpy
2003 python-packaging))
2004 (home-page "https://github.com/astropy/asdf-astropy")
2005 (synopsis "ASDF serialization support for astropy")
2006 (description
2007 "This package includes plugins that provide ASDF serialization support for
2008 Astropy objects.")
2009 (license license:bsd-3)))
2010
2011 (define python-asdf-wcs-schemas
2012 (package
2013 (name "python-asdf-wcs-schemas")
2014 (version "0.1.1")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "asdf_wcs_schemas" version))
2019 (sha256
2020 (base32 "0khyab9mnf2lv755as8kwhk3lqqpd3f4291ny3b9yp3ik86fzhz1"))))
2021 (build-system python-build-system)
2022 (arguments
2023 `(#:phases
2024 (modify-phases %standard-phases
2025 (replace 'check
2026 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2027 (when tests?
2028 (add-installed-pythonpath inputs outputs)
2029 (invoke "python" "-m" "pytest")))))))
2030 (native-inputs
2031 (list python-pytest
2032 python-setuptools-scm
2033 python-semantic-version))
2034 (propagated-inputs
2035 (list python-asdf))
2036 (home-page "https://github.com/asdf-format/asdf-wcs-schemas")
2037 (synopsis "ASDF WCS Schemas")
2038 (description
2039 "This package provides ASDF schemas for validating World Coordinate
2040 System (WCS) tags. Users should not need to install this directly; instead,
2041 install an implementation package such as gwcs.")
2042 (license license:bsd-3)))
2043
2044 (define-public python-gwcs
2045 (package
2046 (name "python-gwcs")
2047 (version "0.18.0")
2048 (source
2049 (origin
2050 (method url-fetch)
2051 (uri (pypi-uri "gwcs" version))
2052 (sha256
2053 (base32 "194j49m8xjjzv9pp8cnj06igz8sdxb0nphyybcc7mhigw0f0kr30"))))
2054 (build-system python-build-system)
2055 (arguments
2056 `(#:phases
2057 (modify-phases %standard-phases
2058 (replace 'check
2059 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2060 (when tests?
2061 (add-installed-pythonpath inputs outputs)
2062 (invoke "python" "-m" "pytest")))))))
2063 (native-inputs
2064 (list python-jsonschema
2065 python-jmespath
2066 python-pytest
2067 python-pytest-doctestplus
2068 python-pyyaml
2069 python-semantic-version
2070 python-setuptools-scm))
2071 (propagated-inputs
2072 (list python-asdf
2073 python-asdf-astropy
2074 python-asdf-wcs-schemas
2075 python-astropy
2076 python-numpy
2077 python-scipy))
2078 (home-page "https://gwcs.readthedocs.io/en/latest/")
2079 (synopsis "Generalized World Coordinate System")
2080 (description "Generalized World Coordinate System (GWCS) is an Astropy
2081 affiliated package providing tools for managing the World Coordinate System of
2082 astronomical data.
2083
2084 GWCS takes a general approach to the problem of expressing transformations
2085 between pixel and world coordinates. It supports a data model which includes
2086 the entire transformation pipeline from input coordinates (detector by
2087 default) to world coordinates.")
2088 (license license:bsd-3)))
2089
2090 (define-public python-astroalign
2091 (package
2092 (name "python-astroalign")
2093 (version "2.3.1")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "astroalign" version))
2098 (sha256
2099 (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
2100 (build-system python-build-system)
2101 (arguments
2102 ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
2103 `(#:tests? #f))
2104 (inputs
2105 `(("numpy" ,python-numpy)
2106 ("scikit-image" ,python-scikit-image)
2107 ("scipy" ,python-scipy)
2108 ("sep" ,python-sep)))
2109 (home-page "https://astroalign.readthedocs.io/")
2110 (synopsis "Astrometric Alignment of Images")
2111 (description
2112 "ASTROALIGN is a python module that will try to align two stellar
2113 astronomical images, especially when there is no WCS information available.")
2114 (license license:expat)))
2115
2116 (define-public python-skyfield
2117 (package
2118 (name "python-skyfield")
2119 (version "1.39")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (pypi-uri "skyfield" version))
2124 (sha256
2125 (base32 "1qh3k7g9dm6idppk87hnwxpx9a22xx98vav0zk31p6291drak3as"))))
2126 (build-system python-build-system)
2127 (arguments
2128 ;; NOTE: (Sharlatan-20210207T163305+0000): tests depend on custom test
2129 ;; framework https://github.com/brandon-rhodes/assay
2130 `(#:tests? #f))
2131 (inputs
2132 (list python-certifi python-jplephem python-numpy python-sgp4))
2133 (home-page "https://rhodesmill.org/skyfield/")
2134 (synopsis "Astronomy for Python")
2135 (description
2136 "Skyfield computes positions for the stars, planets, and satellites in
2137 orbit around the Earth.")
2138 (license license:expat)))