From 60e10967c02a73fe45dfde6b0dc3ac70dc061a25 Mon Sep 17 00:00:00 2001
From: Timo Millenaar <tmillenaar@gmail.com>
Date: Tue, 29 Apr 2025 13:06:50 +0200
Subject: [PATCH] Expose elevation for parset

---
 compress_pipeline.cwl              | 12 ++++++++----
 download_and_compress_pipeline.cwl |  4 ++++
 steps/define_parset.cwl            |  5 ++++-
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/compress_pipeline.cwl b/compress_pipeline.cwl
index 41634ee..f755e55 100644
--- a/compress_pipeline.cwl
+++ b/compress_pipeline.cwl
@@ -16,6 +16,8 @@ inputs:
   type: boolean?
 - id: msin
   type: Directory
+- id: flag_elevation
+  type: string?
 
 outputs:
 - id: inspect
@@ -110,7 +112,7 @@ steps:
 - id: extract_sip_meta
   in:
   - id: msin
-    source: 
+    source:
     - dppp/msout
     - msin
     pickValue: first_non_null
@@ -167,6 +169,8 @@ steps:
     source: flag_autocorrelation
   - id: is_raw
     source: identify_issues/is_raw
+  - id: flag_elevation
+    source: flag_elevation
   run: steps/define_parset.cwl
   out:
   - id: output
@@ -174,7 +178,7 @@ steps:
   label: compress
   in:
   - id: directory
-    source: 
+    source:
     - dppp/msout
     - msin
     pickValue: first_non_null
@@ -187,12 +191,12 @@ steps:
 - id: inspect_step
   in:
   - id: msin
-    source: 
+    source:
     - dppp/msout
     - msin
     pickValue: first_non_null
   - id: inspect_file_name
-    source: 
+    source:
     - dppp/msout
     - msin
     pickValue: first_non_null
diff --git a/download_and_compress_pipeline.cwl b/download_and_compress_pipeline.cwl
index 6ad92e4..cc6b6bc 100644
--- a/download_and_compress_pipeline.cwl
+++ b/download_and_compress_pipeline.cwl
@@ -17,6 +17,8 @@ inputs:
   type: string[]
 - id: is_long_baseline
   type: boolean?
+- id: flag_elevation
+  type: string?
 
 outputs:
 - id: compressed
@@ -67,6 +69,8 @@ steps:
     source: flag_autocorrelation
   - id: is_long_baseline
     source: is_long_baseline
+  - id: flag_elevation
+    source: flag_elevation
   scatter:
   - msin
   run: ./compress_pipeline.cwl
diff --git a/steps/define_parset.cwl b/steps/define_parset.cwl
index 79ca3f4..d59f3f6 100644
--- a/steps/define_parset.cwl
+++ b/steps/define_parset.cwl
@@ -22,7 +22,7 @@ requirements:
       aoflag.strategy=/usr/local/share/aoflagger/strategies/lofar-default.lua
       #
       flagelev.type=preflagger
-      flagelev.elevation=0deg..20deg
+      flagelev.elevation=$(inputs.flag_elevation)
       #
       flagamp.amplmin=1e-30
       flagamp.type=preflagger
@@ -35,6 +35,9 @@ inputs:
 - id: is_raw
   type: boolean
   default: true
+- id: flag_elevation
+  type: string
+  default: '0deg..20deg'
 
 outputs:
 - id: output
-- 
GitLab