X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/51418c32d95d8188d8877616829f26479f1135c6..7bf82f5ede57c9c5344ddb1d4dcfe694eb306bef:/gnu/packages/astronomy.scm diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 775a937907..6105ef2590 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages fontutils) @@ -40,18 +41,25 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages image) + #:use-module (gnu packages libusb) #:use-module (gnu packages lua) #:use-module (gnu packages maths) #:use-module (gnu packages netpbm) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pretty-print) + #:use-module (gnu packages python-check) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-science) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages version-control) + #:use-module (gnu packages video) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (ice-9 match) #:use-module (srfi srfi-1)) @@ -88,6 +96,51 @@ in FITS files.") (license (license:non-copyleft "file://License.txt" "See License.txt in the distribution.")))) +(define-public qfits + (package + (name "qfits") + (version "6.2.0") + (source + (origin + (method url-fetch) + (uri + (string-append "ftp://ftp.eso.org/pub/qfits/qfits-" version ".tar.gz")) + (sha256 + (base32 "0m2b21mim3a7wgfg3ph2w5hv7mdvr03jmmhzipc0wcahijglcw9j")))) + (build-system gnu-build-system) + (home-page "https://www.eso.org/sci/software/eclipse/qfits/") + (synopsis "C library offering access to astronomical FITS files") + (description + "@code{qfits} is a C library giving access to FITS file internals, both +for reading and writing.") + (license license:gpl2+))) + +(define-public erfa + (package + (name "erfa") + (version "1.7.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/liberfa/erfa") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1vsqwvzlk7r8q7nwyb7i710blcfdl5kwcm2va9km07a820nsp84a")))) + (build-system gnu-build-system) + (native-inputs + `(("automake" ,automake) + ("autoreconf" ,autoconf) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (home-page "https://github.com/liberfa/erfa") + (synopsis "Essential Routines for Fundamental Astronomy") + (description + "ERFA is a C library containing key algorithms for astronomy, and is based +on the SOFA library published by the International Astronomical Union (IAU).") + (license license:bsd-3))) + (define-public eye (package (name "eye") @@ -114,7 +167,7 @@ feature detection and cosmetic corrections.") (define-public wcslib (package (name "wcslib") - (version "6.4") + (version "7.5") (source (origin (method url-fetch) @@ -122,7 +175,7 @@ feature detection and cosmetic corrections.") "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version ".tar.bz2")) (sha256 - (base32 "003h23m6d5wcs29v2vbnl63f3z35k5x70lpsqlz5c9bp1bvizh8k")))) + (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw")))) (inputs `(("cfitsio" ,cfitsio))) (build-system gnu-build-system) @@ -150,6 +203,26 @@ coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image header.") (license license:lgpl3+))) +(define-public weightwatcher + (package + (name "weightwatcher") + (version "1.12") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.astromatic.net/download/weightwatcher/" + "weightwatcher-" version ".tar.gz")) + (sha256 + (base32 "1zaqd8d9rpgcwjsp92q3lkfaa22i20gppb91dz34ym54swisjc2p")))) + (build-system gnu-build-system) + (home-page "https://www.astromatic.net/software/weightwatcher") + (synopsis "Weight-map/flag-map multiplexer and rasteriser") + (description + "Weightwatcher is a program hat combines weight-maps, flag-maps and +polygon data in order to produce control maps which can directly be used in +astronomical image-processing packages like Drizzle, Swarp or SExtractor.") + (license license:gpl3+))) + (define-public gnuastro (package (name "gnuastro") @@ -229,6 +302,100 @@ large scale galaxy-survey data, it can perform reasonably well on moderately crowded star fields.") (license license:gpl3+))) +(define-public skymaker + (package + (name "skymaker") + (version "3.10.5") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.astromatic.net/download/skymaker/" + "skymaker-" version ".tar.gz")) + (sha256 + (base32 "03zvx7c89plp9559niqv5532r233kza3ir992rg3nxjksqmrqvx1")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list + (string-append + "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib") + (string-append + "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include")))) + (inputs + `(("fftw" ,fftwf))) + (home-page "https://www.astromatic.net/software/skymaker") + (synopsis "Astronomical image simulator") + (description + "SkyMaker is a program that simulates astronomical images. It accepts +object lists in ASCII generated by the Stuff program to produce realistic +astronomical fields. SkyMaker is part of the EFIGI +(@url{https://www.astromatic.net/projects/efigi}) development project.") + (license license:gpl3+))) + +(define-public stackistry + (package + (name "stackistry") + (version "0.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/GreatAttractor/stackistry") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0rz29v33n0x0k40hv3v79ym5ylch1v0pbph4i21809gz2al5p7dq")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list + (string-append + "SKRY_INCLUDE_PATH=" (assoc-ref %build-inputs "libskry") "/include") + (string-append + "SKRY_LIB_PATH=-L" (assoc-ref %build-inputs "libskry") "/lib") + (string-append + "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include")) + #:phases + (modify-phases %standard-phases + ;; no configure and tests are provided + (delete 'configure) + (delete 'check) + (add-after 'unpack 'fix-paths + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/main.cpp" + (("\"\\.\\.\", \"lang\"") + "\"../share/stackistry\", \"lang\"")) + (substitute* "src/utils.cpp" + (("\"\\.\\.\", \"icons\"") + "\"../share/stackistry\", \"icons\"")) + #t)) + (replace 'install + ;; The Makefile lacks an ‘install’ target. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (icons (string-append out "/share/stackistry/icons")) + (lang (string-append out "/share/stackistry/lang"))) + (copy-recursively "bin" bin) + (copy-recursively "icons" icons) + (copy-recursively "lang" lang)) + #t))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("gtkmm" ,gtkmm) + ("libskry" ,libskry) + ("ffmpeg" ,ffmpeg))) + (home-page "https://github.com/GreatAttractor/stackistry") + (synopsis "Astronomical lucky imaging/image stacking tool") + (description + "Stackistry implements the lucky imaging principle of astronomical +imaging: creating a high-quality still image out of a series of many (possibly +thousands) low quality ones (blurred, deformed, noisy). The resulting image +stack typically requires post-processing, including sharpening (e.g. via +deconvolution). Such post-processing is not performed by Stackistry.") + (license license:gpl3+))) + (define-public stellarium (package (name "stellarium") @@ -276,6 +443,46 @@ can be used to control telescopes over a serial port for tracking celestial objects.") (license license:gpl2+))) +(define-public stuff + (package + (name "stuff") + (version "1.26.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.astromatic.net/download/stuff/" + "stuff-" version ".tar.gz")) + (sha256 + (base32 "1syibi3b86z9pikhicvkkmgxm916j732fdiw0agw0lq6z13fdcjm")))) + (build-system gnu-build-system) + (home-page "https://www.astromatic.net/software/stuff") + (synopsis "Astronomical catalogue simulation") + (description + "Stuff is a program that simulates \"perfect\" astronomical catalogues. +It generates object lists in ASCII which can read by the SkyMaker program to +produce realistic astronomical fields. Stuff is part of the EFIGI development +project.") + (license license:gpl3+))) + +(define-public swarp + (package + (name "swarp") + (version "2.38.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.astromatic.net/download/swarp/" + "swarp-" version ".tar.gz")) + (sha256 + (base32 "1i670waqp54vin1cn08mqckcggm9zqd69nk7yya2vvqpdizn6jpm")))) + (build-system gnu-build-system) + (home-page "https://www.astromatic.net/software/swarp") + (synopsis "FITS image resampling and co-addition") + (description + "SWarp is a program that resamples and co-adds together FITS images using +any arbitrary astrometric projection defined in the WCS standard.") + (license license:gpl3+))) + (define-public celestia (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce")) (package @@ -372,6 +579,48 @@ Mechanics, Astrometry and Astrodynamics library.") (license (list license:lgpl2.0+ license:gpl2+)))) ; examples/transforms.c & lntest/*.c +(define-public libskry + (package + (name "libskry") + (version "0.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/GreatAttractor/libskry") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14kwng0j8wqzlb0gqg3ayq36l15dpz7kvxc56fa47j55b376bwh6")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list + (string-append + "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include")) + #:phases + (modify-phases %standard-phases + (delete 'configure) ;; no configure provided + (delete 'check) ;; no tests provided + (replace 'install + ;; The Makefile lacks an ‘install’ target. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (include (string-append out "/include"))) + (copy-recursively "bin" lib) + (copy-recursively "include" include)) + #t))))) + (inputs + `(("ffmpeg" ,ffmpeg))) + (home-page "https://github.com/GreatAttractor/libskry") + (synopsis "Astronimical lucky imaging library") + (description + "@code{libskry} implements the lucky imaging principle of astronomical +imaging: creating a high-quality still image out of a series of many thousands) +low quality ones") + (license license:gpl3+))) + (define-public libpasastro ;; NOTE: (Sharlatan-20210122T215921+0000): the version tag has a build ;; error on spice which is resolved with the latest commit. @@ -421,6 +670,33 @@ standard astronomy libraries: @end itemize\n") (license license:gpl2+)))) +(define-public missfits + (package + (name "missfits") + (version "2.8.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.astromatic.net/download/missfits/" + "missfits-" version ".tar.gz")) + (sha256 + (base32 "04jrd7fsvzr14vdmwgj2f6v97gdcfyjyz6jppml3ghr9xh12jxv5")))) + (build-system gnu-build-system) + (home-page "https://www.astromatic.net/software/missfits") + (synopsis "FITS files Maintenance program") + (description + "MissFITS is a program that performs basic maintenance and packaging tasks +on FITS files: + +@itemize +@item add/edit FITS header keywords +@item split/join Multi-Extension-FITS (MEF) files +@item unpack/pack FITS data-cubes +@item create/check/update FITS checksums, using R. Seaman's protocol + (see http://www.adass.org/adass/proceedings/adass94/seamanr.html) +@end itemize\n") + (license license:gpl3+))) + (define-public xplanet (package (name "xplanet") @@ -513,3 +789,246 @@ Gpredict can also predict the time of future passes for a satellite, and provide you with detailed information about each pass.") (home-page "http://gpredict.oz9aec.net/index.php") (license license:gpl2+))) + +(define-public indi + (package + (name "indi") + (version "1.8.9") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/indilib/indi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0nw4b2cdsg244slcm3yf1v11jlxbbjrpvi6ax90svs7rlandz8jv")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (let ((out (assoc-ref %outputs "out"))) + (list + "-DINDI_BUILD_UNITTESTS=ON" + "-DCMAKE_BUILD_TYPE=Release" + (string-append "-DCMAKE_INSTALL_PREFIX=" out) + (string-append "-DUDEVRULES_INSTALL_DIR=" out "/lib/udev/rules.d"))) + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (chdir "test") + (invoke "ctest") + (chdir "..") + #t)) + (add-before 'install 'set-install-directories + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/lib/udev/rules.d"))) + #t))))) + (native-inputs + `(("googletest" ,googletest))) + (inputs + `(("cfitsio" ,cfitsio) + ("curl" ,curl) + ("fftw" ,fftw) + ("gsl" ,gsl) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libnova" ,libnova) + ("libtiff" ,libtiff) + ("libusb" ,libusb) + ("zlib" ,zlib))) + (home-page "https://www.indilib.org") + (synopsis "Library for astronimical intrumentation control") + (description + "INDI (Instrument-Neutral Device Interface) is a distributed XML-based +control protocol designed to operate astronomical instrumentation. INDI is +small, flexible, easy to parse, scalable, and stateless. It supports common +DCS functions such as remote control, data acquisition, monitoring, and a lot +more.") + (license (list license:bsd-3 + license:gpl2+ + license:lgpl2.0+ + license:lgpl2.1+)))) + +(define-public python-jplephem + (package + (name "python-jplephem") + (version "2.15") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jplephem" version)) + (sha256 + (base32 "1ca3dswsslij79qg6dcijjz4l0fj6nzmxld8z93v45ahlkhps0g0")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "PYTHONPATH" + (string-append "./build/lib:" + (getenv "PYTHONPATH"))) + (setenv "PATH" (string-append out "/bin:" + (getenv "PATH"))) + (invoke "python" "-m" "unittest" "discover" "-s" "test"))))))) + (inputs + `(("python-numpy" ,python-numpy))) + (home-page "https://github.com/brandon-rhodes/python-jplephem") + (synopsis "Python version of NASA DE4xx ephemerides") + (description + "The package is a Python implementation of the mathematics that standard +JPL ephemerides use to predict raw (x,y,z) planetary positions.") + (license license:expat))) + +(define-public python-pyerfa + (package + (name "python-pyerfa") + (version "1.7.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyerfa" version)) + (sha256 + (base32 "1s78mdyrxha2jcckfs0wg5ynkf0pwh1bw9mmh99vprinxh9n4xri")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled submodule library. + (delete-file-recursively "liberfa") + #t)))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'use-system-liberfa + (lambda _ + (setenv "PYERFA_USE_SYSTEM_LIBERFA" "1") + #t))))) + (native-inputs + `(("pytest" ,python-pytest) + ("setuptools-scm" ,python-setuptools-scm) + ("pytest-doctestplus" ,python-pytest-doctestplus))) + (inputs + `(("liberfa" ,erfa) + ("numpy" ,python-numpy))) + (home-page "https://github.com/liberfa/pyerfa") + (synopsis "Python bindings for ERFA") + (description + "PyERFA is the Python wrapper for the ERFA library (Essential +Routines for Fundamental Astronomy), a C library containing key algorithms for +astronomy, which is based on the SOFA library published by the International +Astronomical Union (IAU). All C routines are wrapped as Numpy universal +functions, so that they can be called with scalar or array inputs.") + (license license:bsd-3))) + +(define-public python-sep + (package + (name "python-sep") + (version "1.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sep" version)) + (sha256 + (base32 "0wxdqn92q1grv8k7xi7h88ac6wnznw4xh5bdlz1vz6za2dgsyj4m")))) + (build-system python-build-system) + (native-inputs + `(("cython" ,python-cython) + ("pytest" ,python-pytest))) + (inputs + `(("numpy" ,python-numpy))) + (home-page "https://github.com/kbarbary/sep") + (synopsis "Astronomical source extraction and photometry library") + (description + "SEP makes the core algorithms of Source Extractor available as a library +of stand-alone functions and classes.") + (license (list license:bsd-3 + license:expat + license:lgpl3+)))) + +(define-public python-asdf + (package + (name "python-asdf") + (version "2.7.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "asdf" version)) + (sha256 + (base32 "1y47zhkd90i8wmm2i35amfl0rvjqlb3fcx90xp7n9kr2z0byzyzg")))) + (build-system python-build-system) + (arguments + ;; TODO: (Sharlatan-20210207T165820+0000): Tests depend on astropy, astropy + ;; depends on asdf. Disable circular dependence. + `(#:tests? #f)) + (native-inputs + `(("packaging" ,python-packaging) + ("semantic-version" ,python-semantic-version) + ("setuptools-scm" ,python-setuptools-scm))) + (inputs + `(("importlib-resources" ,python-importlib-resources) + ("jsonschema" ,python-jsonschema) + ("numpy" ,python-numpy) + ("pyyaml" ,python-pyyaml))) + (home-page "https://github.com/asdf-format/asdf") + (synopsis "Python tools to handle ASDF files") + (description + "The Advanced Scientific Data Format (ASDF) is a next-generation +interchange format for scientific data. This package contains the Python +implementation of the ASDF Standard.") + (license license:bsd-3))) + +(define-public python-astroalign + (package + (name "python-astroalign") + (version "2.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "astroalign" version)) + (sha256 + (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1")))) + (build-system python-build-system) + (arguments + ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run + `(#:tests? #f)) + (inputs + `(("numpy" ,python-numpy) + ("scikit-image" ,python-scikit-image) + ("scipy" ,python-scipy) + ("sep" ,python-sep))) + (home-page "https://astroalign.readthedocs.io/") + (synopsis "Astrometric Alignment of Images") + (description + "ASTROALIGN is a python module that will try to align two stellar +astronomical images, especially when there is no WCS information available.") + (license license:expat))) + +(define-public python-skyfield + (package + (name "python-skyfield") + (version "1.36") + (source + (origin + (method url-fetch) + (uri (pypi-uri "skyfield" version)) + (sha256 + (base32 "1dm1327a4qv3klj9blrvddbhl72v1fqz52ym9km8qjj9vdkpywh6")))) + (build-system python-build-system) + (arguments + ;; NOTE: (Sharlatan-20210207T163305+0000): tests depend on custom test + ;; framework https://github.com/brandon-rhodes/assay + `(#:tests? #f)) + (inputs + `(("certifi" ,python-certifi) + ("jplephem" ,python-jplephem) + ("numpy" ,python-numpy) + ("sgp4" ,python-sgp4))) + (home-page "https://rhodesmill.org/skyfield/") + (synopsis "Astronomy for Python") + (description + "Skyfield computes positions for the stars, planets, and satellites in +orbit around the Earth.") + (license license:expat)))