Skip to content
Snippets Groups Projects
Commit 88a6c2ba authored by alex's avatar alex
Browse files

bugfixes

Former-commit-id: e6c87662 [formerly f9fb5c8b]
Former-commit-id: f8fe5fb1
Former-commit-id: 210383a3
parent 38d6aa23
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ outputs: ...@@ -48,7 +48,7 @@ outputs:
- id: msout - id: msout
type: Directory[] type: Directory[]
outputBinding: outputBinding:
glob: 'L*.ms.dpppconcat' glob: 'L*.dpppconcat'
- id: unflagged_fraction - id: unflagged_fraction
type: float type: float
outputBinding: outputBinding:
......
...@@ -21,7 +21,6 @@ arguments: ...@@ -21,7 +21,6 @@ arguments:
from identifyBadAntennas_CWL import main as identifyBadAntennas from identifyBadAntennas_CWL import main as identifyBadAntennas
ms = sys.argv[1] ms = sys.argv[1]
filter = '$(inputs.filter)'
output = identifyBadAntennas(ms) output = identifyBadAntennas(ms)
......
...@@ -19,18 +19,21 @@ label: identifyBadAntennas_join ...@@ -19,18 +19,21 @@ label: identifyBadAntennas_join
arguments: arguments:
- '-c' - '-c'
- | - |
flaggedants_list = sys.argv[1:] import sys
import json
flaggedants = $(inputs.flaggedants)
filter = '$(inputs.filter)' filter = '$(inputs.filter)'
flaggedants_list = [ flaggedant.split(',') for flaggedant in flaggedants ]
flagged_antenna_list = set.intersection(*map(set, flaggedants_list)) flagged_antenna_list = set.intersection(*map(set, flaggedants_list))
for flagged_antenna in flagged_antenna_list: for flagged_antenna in flagged_antenna_list:
filter += ';!' + flagged_antenna + '*&&*' filter += ';!' + flagged_antenna + '*&&*'
print('Identified bad antennas: ' + str(flagged_antenna_list)) cwl_output = {"filter": filter}
cwl_output = {"filter": str(filter)}
with open('./out.json', 'w') as fp: with open('./out.json', 'w') as fp:
json.dump(cwl_output, fp) json.dump(cwl_output, fp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment