Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LINC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
LINC
Commits
2e65109c
Commit
2e65109c
authored
4 years ago
by
alex
Browse files
Options
Downloads
Patches
Plain Diff
parallelize identifyBadAntennas
Former-commit-id:
9847f252
parent
c7ee4eb7
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
steps/identify_bad_antennas.cwl
+9
-12
9 additions, 12 deletions
steps/identify_bad_antennas.cwl
steps/identify_bad_antennas_join.cwl
+54
-0
54 additions, 0 deletions
steps/identify_bad_antennas_join.cwl
workflows/prefactor_target/gsmcal.cwl
+49
-13
49 additions, 13 deletions
workflows/prefactor_target/gsmcal.cwl
with
112 additions
and
25 deletions
steps/identify_bad_antennas.cwl
+
9
−
12
View file @
2e65109c
...
...
@@ -7,14 +7,10 @@ baseCommand:
- python3
inputs:
- id: msin
type: Directory
[]
type: Directory
doc: MS to compare with
inputBinding:
position: 0
- id: filter
type: string?
default: '*&'
doc: Filter these baselines for the comparison
label: identifyBadAntennas.py
arguments:
...
...
@@ -22,25 +18,26 @@ arguments:
- |
import sys
import json
from identifyBadAntennas import main as identifyBadAntennas
from identifyBadAntennas
_CWL
import main as identifyBadAntennas
ms
s
= sys.argv[1
:
]
ms = sys.argv[1]
filter = '$(inputs.filter)'
output = identifyBadAntennas(ms
s, filter
)
output = identifyBadAntennas(ms)
f
ilter_out
= output['f
ilter
']
cwl_output = {"f
ilter_out": filter_out
}
f
laggedants
= output['f
laggedants
']
cwl_output
= {"f
laggedants": flaggedants
}
with open('./out.json', 'w') as fp:
json.dump(cwl_output, fp)
outputs:
- id: f
ilter_out
- id: f
laggedants
type: string
outputBinding:
loadContents: true
glob: 'out.json'
outputEval: $(JSON.parse(self[0].contents).f
ilter_out
)
outputEval: $(JSON.parse(self[0].contents).f
laggedants
)
- id: logfile
type: File?
outputBinding:
...
...
This diff is collapsed.
Click to expand it.
steps/identify_bad_antennas_join.cwl
0 → 100644
+
54
−
0
View file @
2e65109c
class: CommandLineTool
cwlVersion: v1.0
$namespaces:
sbg: 'https://www.sevenbridges.com/'
id: identify_bad_antennas_join
baseCommand:
- python3
inputs:
- id: flaggedants
type: string[]?
default: []
doc: list of flagged antennas
- id: filter
type: string?
default: '*&'
doc: Filter these baselines for the comparison
label: identifyBadAntennas_join
arguments:
- '-c'
- |
flaggedants_list = sys.argv[1:]
filter = '$(inputs.filter)'
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)}
with open('./out.json', 'w') as fp:
json.dump(cwl_output, fp)
outputs:
- id: filter_out
type: string
outputBinding:
loadContents: true
glob: 'out.json'
outputEval: $(JSON.parse(self[0].contents).filter)
- id: logfile
type: File?
outputBinding:
glob: identifyBadAntennas.log
requirements:
- class: InlineJavascriptRequirement
stdout: identifyBadAntennas.log
stderr: identifyBadAntennas_err.log
\ No newline at end of file
This diff is collapsed.
Click to expand it.
workflows/prefactor_target/gsmcal.cwl
+
49
−
13
View file @
2e65109c
...
...
@@ -73,7 +73,7 @@ outputs:
'sbg:y': 200
- id: bad_antennas
outputSource:
- identifybadantennas/filter_out
- identifybadantennas
_join
/filter_out
type: string
'sbg:x': 1500
'sbg:y': 400
...
...
@@ -96,7 +96,7 @@ outputs:
'sbg:y': 800
- id: logfiles
outputSource:
-
identifybadantennas/logfile
-
concat_logfiles_identify/output
- sort_times_into_freqGroups/logfile
- find_skymodel_target/logfile
- make_sourcedb_target/log
...
...
@@ -112,16 +112,30 @@ steps:
- id: identifybadantennas
in:
- id: msin
source:
source: msin
out:
- id: flaggedants
- id: logfile
run: ../../steps/identify_bad_antennas.cwl
label: identifybadantennas
scatter:
- msin
'sbg:x': -200
'sbg:y': -300
- id: identifybadantennas_join
in:
- id: flaggedants
source: identifybadantennas/flaggedants
- id: filter
source: filter_baselines
out:
- id: filter_out
- id: logfile
run: ../../steps/identify_bad_antennas.cwl
label: identifybadantennas
'sbg:x': -200
run: ../../steps/identify_bad_antennas_join.cwl
label: identifybadantennas_join
scatter:
- msin
'sbg:x': 0
'sbg:y': -300
- id: sort_times_into_freqGroups
in:
...
...
@@ -170,10 +184,10 @@ steps:
in:
- id: sky_model
source: find_skymodel_target/skymodel
- id: logname
default: make_sourcedb_target.log
- id: output_file_name
default: target.sourcedb
- id: logname
default: make_sourcedb_target.log
out:
- id: sourcedb
- id: log
...
...
@@ -253,6 +267,21 @@ steps:
label: concat_logfiles_unflagged
'sbg:x': 1200
'sbg:y': 900
- id: concat_logfiles_identify
in:
- id: file_list
linkMerge: merge_flattened
source:
- identifybadantennas/logfile
- identifybadantennas_join/logfile
- id: file_prefix
default: identifyBadAntennas
out:
- id: output
run: ../../steps/concatenate_files.cwl
label: concat_logfiles_identify
'sbg:x': 1200
'sbg:y': -100
- id: concat
in:
- id: msin
...
...
@@ -263,7 +292,7 @@ steps:
- id: groups_specification
source: sort_times_into_freqGroups/filenames
- id: filter_baselines
source: identifybadantennas/filter_out
source: identifybadantennas
_join
/filter_out
- id: avg_timeresolution_concat
source: avg_timeresolution_concat
- id: avg_freqresolution_concat
...
...
@@ -271,9 +300,9 @@ steps:
- id: min_unflagged_fraction
source: min_unflagged_fraction
out:
- id: msout_old
- id: unflagged_fraction
- id: msout
- id: msout_old
- id: dpppconcat.log
- id: check_unflagged_fraction.log
run: ../../subworkflow/concat.cwl
...
...
@@ -335,9 +364,11 @@ steps:
- id: plot_unflagged
in:
- id: msin
source: concat/msout_old
source:
- concat/msout_old
- id: unflagged_fraction
source: concat/unflagged_fraction
source:
- concat/unflagged_fraction
out:
- id: output_imag
- id: logfile
...
...
@@ -370,6 +401,7 @@ steps:
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_P
'sbg:x': 1000
...
...
@@ -400,6 +432,7 @@ steps:
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_P2
'sbg:x': 1000
...
...
@@ -431,6 +464,7 @@ steps:
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_Pd
'sbg:x': 1000
...
...
@@ -461,6 +495,7 @@ steps:
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_Pd2
'sbg:x': 1000
...
...
@@ -470,3 +505,4 @@ requirements:
- class: InlineJavascriptRequirement
- class: SubworkflowFeatureRequirement
- class: ScatterFeatureRequirement
- class: MultipleInputFeatureRequirement
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment