From 88a6c2ba754076605f8e5b23c5047c935aab907c Mon Sep 17 00:00:00 2001 From: Alexander Drabent <alex@tls-tautenburg.de> Date: Wed, 9 Dec 2020 12:04:12 +0100 Subject: [PATCH] bugfixes Former-commit-id: e6c87662824bd0b697b26d3530dbcacb3a040357 [formerly f9fb5c8be8d77e6d05c9750b186d10d3adb7af0d] Former-commit-id: f8fe5fb170ac5b458e2aadd79dd1439f1109a96c Former-commit-id: 210383a33d2aaf4871e03cc172395432cb3e489b --- steps/check_unflagged_fraction.cwl | 2 +- steps/identify_bad_antennas.cwl | 1 - steps/identify_bad_antennas_join.cwl | 15 +++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/steps/check_unflagged_fraction.cwl b/steps/check_unflagged_fraction.cwl index 0d7d2a01..0a42b9ff 100644 --- a/steps/check_unflagged_fraction.cwl +++ b/steps/check_unflagged_fraction.cwl @@ -48,7 +48,7 @@ outputs: - id: msout type: Directory[] outputBinding: - glob: 'L*.ms.dpppconcat' + glob: 'L*.dpppconcat' - id: unflagged_fraction type: float outputBinding: diff --git a/steps/identify_bad_antennas.cwl b/steps/identify_bad_antennas.cwl index 822e9850..0fa09ff1 100644 --- a/steps/identify_bad_antennas.cwl +++ b/steps/identify_bad_antennas.cwl @@ -21,7 +21,6 @@ arguments: from identifyBadAntennas_CWL import main as identifyBadAntennas ms = sys.argv[1] - filter = '$(inputs.filter)' output = identifyBadAntennas(ms) diff --git a/steps/identify_bad_antennas_join.cwl b/steps/identify_bad_antennas_join.cwl index 8745f75f..03a3c2e5 100644 --- a/steps/identify_bad_antennas_join.cwl +++ b/steps/identify_bad_antennas_join.cwl @@ -19,18 +19,21 @@ label: identifyBadAntennas_join arguments: - '-c' - | - - flaggedants_list = sys.argv[1:] + + import sys + import json + + flaggedants = $(inputs.flaggedants) filter = '$(inputs.filter)' + + flaggedants_list = [ flaggedant.split(',') for flaggedant in flaggedants ] flagged_antenna_list = set.intersection(*map(set, flaggedants_list)) - + for flagged_antenna in flagged_antenna_list: filter += ';!' + flagged_antenna + '*&&*' - print('Identified bad antennas: ' + str(flagged_antenna_list)) - - cwl_output = {"filter": str(filter)} + cwl_output = {"filter": filter} with open('./out.json', 'w') as fp: json.dump(cwl_output, fp) -- GitLab