summary refs log tree commit diff
path: root/gnu/packages/astronomy.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2022-06-26 18:34:58 +0100
committerLudovic Courtès <ludo@gnu.org>2022-08-04 12:05:47 +0200
commitcdff1423c0d03e7d3e8445cf14f1123f694468c8 (patch)
tree0d73c1b7142ec31400cb0a523a0745c5e11fa053 /gnu/packages/astronomy.scm
parent4ccd4176a2f63004fe10c9e8c9ccc8ba46b9d408 (diff)
downloadguix-cdff1423c0d03e7d3e8445cf14f1123f694468c8.tar.gz
gnu: Add aoflagger.
* gnu/packages/astronomy.scm (aoflagger): New variable.
* gnu/packages/patches/aoflagger-use-system-provided-pybind11.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/astronomy.scm')
-rw-r--r--gnu/packages/astronomy.scm63
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 336ef02d66..3c4c92619e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -142,6 +142,69 @@ moment, supported SPICE files are:
 @end itemize\n")
     (license license:cecill)))
 
+(define-public aoflagger
+  (package
+    (name "aoflagger")
+    (version "3.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/aroffringa/aoflagger")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1dcbfrbiybhpbypna2xhddx1wk7yifh38ha2r6p5rzsikzwlsin1"))
+       (patches
+        (search-patches "aoflagger-use-system-provided-pybind11.patch"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      ;; XXX: Tests require external files download from
+      ;; https://www.astron.nl/citt/ci_data/aoflagger/
+      ;; FIXME: runtest is not found
+      #:tests? #f
+      #:configure-flags
+      #~(list (string-append "-DCASACORE_ROOT_DIR="
+                             #$(this-package-input "casacore")))
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; aocommon and pybind11 are expected to be found as git submodules,
+          ;; link them before build.
+          (add-after 'unpack 'link-submodule-package
+            (lambda _
+              (rmdir "external/aocommon")
+              (symlink #$(this-package-native-input "aocommon")
+                       (string-append (getcwd) "/external/aocommon")))))))
+    (native-inputs
+     (list aocommon
+           boost
+           pkg-config
+           python
+           pybind11))
+    (inputs
+     (list casacore
+           cfitsio
+           fftw
+           gsl
+           gtkmm-3
+           hdf5
+           lapack
+           libpng
+           libsigc++
+           libxml2
+           lua
+           openblas
+           zlib))
+    (home-page "https://gitlab.com/aroffringa/aoflagger")
+    (synopsis "Astronomical tool that can find and remove radio-frequency interference")
+    (description
+     "AOFlagger is a tool that can find and remove radio-frequency
+interference (RFI) in radio astronomical observations.  It can make use of Lua
+scripts to make flagging strategies flexible, and the tools are applicable to a
+wide set of telescopes.")
+    (license license:gpl3+)))
+
 (define-public casacore
   (package
     (name "casacore")