Skip to content
Snippets Groups Projects
Commit 491ff022 authored by alex's avatar alex
Browse files

finish first version target pipeline

Former-commit-id: 7350e7bf
Former-commit-id: 1381a821
parent 2535cc7e
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,13 @@ inputs: ...@@ -55,6 +55,13 @@ inputs:
Type of correction to perform. When using H5Parm, this is for now the name Type of correction to perform. When using H5Parm, this is for now the name
of the soltab; the type will be deduced from the metadata in that soltab, of the soltab; the type will be deduced from the metadata in that soltab,
except for full Jones, in which case correction should be 'fulljones'. except for full Jones, in which case correction should be 'fulljones'.
- default: 'sol000'
id: solset
type: string
inputBinding:
position: 0
prefix: applycal.solset=
separate: false
- id: storagemanager - id: storagemanager
type: string type: string
default: "" default: ""
......
...@@ -9,11 +9,11 @@ inputs: ...@@ -9,11 +9,11 @@ inputs:
- id: msin - id: msin
type: 'Directory[]' type: 'Directory[]'
inputBinding: inputBinding:
position: 0
prefix: msin= prefix: msin=
separate: false separate: false
itemSeparator: ',' itemSeparator: ','
shellQuote: false valueFrom: $(concatenate_path(self))
position: 0
doc: Input Measurement Set doc: Input Measurement Set
- id: msout_name - id: msout_name
type: string type: string
...@@ -44,7 +44,7 @@ inputs: ...@@ -44,7 +44,7 @@ inputs:
inputBinding: inputBinding:
prefix: filter.baseline= prefix: filter.baseline=
separate: false separate: false
shellQuote: false shellQuote: true
position: 0 position: 0
valueFrom: $(self) valueFrom: $(self)
default: null default: null
...@@ -96,7 +96,7 @@ inputs: ...@@ -96,7 +96,7 @@ inputs:
inputBinding: inputBinding:
prefix: msin.baseline= prefix: msin.baseline=
separate: false separate: false
shellQuote: false shellQuote: true
position: 0 position: 0
default: '*' default: '*'
- id: avg_timeresolution - id: avg_timeresolution
...@@ -128,9 +128,12 @@ outputs: ...@@ -128,9 +128,12 @@ outputs:
arguments: arguments:
- 'steps=[filter,avg]' - 'steps=[filter,avg]'
- msout.orderms=False - msout.orderms=False
- avg.type=average
requirements: requirements:
- class: ShellCommandRequirement - class: ShellCommandRequirement
- class: InlineJavascriptRequirement - class: InlineJavascriptRequirement
expressionLib:
- { $include: 'utils.js' }
hints: hints:
- class: DockerRequirement - class: DockerRequirement
dockerPull: 'lofareosc/prefactor:HBAcalibrator' dockerPull: 'lofareosc/prefactor:HBAcalibrator'
......
class: CommandLineTool class: CommandLineTool
cwlVersion: v1.0 cwlVersion: v1.0
$namespaces: $namespaces:
lofar: 'https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl'
sbg: 'https://www.sevenbridges.com/' sbg: 'https://www.sevenbridges.com/'
id: add_missing_stations id: add_missing_stations
baseCommand: baseCommand:
...@@ -17,13 +18,14 @@ inputs: ...@@ -17,13 +18,14 @@ inputs:
type: File type: File
inputBinding: inputBinding:
position: 0 position: 0
prefix: '--refh5parm' prefix: '--refh5'
doc: External H5parm from which the full list of antennas is used from. doc: External H5parm from which the full list of antennas is used from.
- id: solset - id: solset
type: string? type: string?
inputBinding: inputBinding:
position: 0 position: 0
prefix: '--solset' prefix: '--solset'
default: 'sol000'
doc: Input calibration solutions doc: Input calibration solutions
- id: refsolset - id: refsolset
type: string? type: string?
...@@ -31,35 +33,41 @@ inputs: ...@@ -31,35 +33,41 @@ inputs:
position: 0 position: 0
prefix: '--refsolset' prefix: '--refsolset'
doc: Input calibration solutions of the reference h5parm file doc: Input calibration solutions of the reference h5parm file
default: 'sol000'
- id: soltab_in - id: soltab_in
type: string? type: string?
inputBinding: inputBinding:
position: 0 position: 0
prefix: '--soltab_in' prefix: '--soltab_in'
doc: Input solution table doc: Input solution table
default: 'phase000'
- id: soltab_out - id: soltab_out
type: string? type: string?
inputBinding: inputBinding:
position: 0 position: 0
prefix: '--soltab_out' prefix: '--soltab_out'
doc: Output solution table (has to be different from input solution table) doc: Output solution table (has to be different from input solution table)
default: 'GSMphase'
- id: filter - id: filter
type: string? type: string?
inputBinding: inputBinding:
position: 0 position: 0
prefix: '--filter' prefix: '--filter'
doc: Filter these antenna string from the processing doc: Filter these antenna string from the processing
default: '[CR]S*&'
- id: bad_antennas - id: bad_antennas
type: string? type: string?
inputBinding: inputBinding:
position: 0 position: 0
prefix: '--bad_antennas' prefix: '--bad_antennas'
doc: Antenna string to be processed doc: Antenna string to be processed
default: '[CR]S*&'
outputs: outputs:
- id: outh5parm - id: outh5parm
type: File type: File
outputBinding: outputBinding:
glob: $(inputs.h5parm.basename) glob: $(inputs.h5parm.basename)
format: 'lofar:#H5Parm'
- id: log - id: log
type: File[] type: File[]
outputBinding: outputBinding:
...@@ -77,3 +85,5 @@ requirements: ...@@ -77,3 +85,5 @@ requirements:
listing: listing:
- entry: $(inputs.h5parm) - entry: $(inputs.h5parm)
writable: true writable: true
$schema:
- 'https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl'
...@@ -34,12 +34,13 @@ requirements: ...@@ -34,12 +34,13 @@ requirements:
entry: | entry: |
import sys import sys
import json import json
import os.path as path import os
group_id = "$(inputs.group_id)" group_id = "$(inputs.group_id)"
json_file = sys.argv[1] json_file = sys.argv[1]
ms_list = sys.argv[2:] ms_list = sys.argv[2:]
ms_by_name = { ms.split(path.sep)[-1]: ms_by_name = { ms.split(os.path.sep)[-1]:
{'class':'Directory', 'path': ms} for ms in ms_list} {'class':'Directory', 'path': ms} for ms in ms_list}
output_file = 'selected_ms.json' output_file = 'selected_ms.json'
...@@ -47,7 +48,7 @@ requirements: ...@@ -47,7 +48,7 @@ requirements:
with open(json_file, 'r') as f_stream: with open(json_file, 'r') as f_stream:
selected_ms = json.load(f_stream)[group_id] selected_ms = json.load(f_stream)[group_id]
print(selected_ms, ms_by_name) print(selected_ms, ms_by_name)
selected_ms = [ms_by_name[ms_name] for ms_name in selected_ms] selected_ms = [ms_by_name[os.path.basename(ms_name)] for ms_name in selected_ms]
with open(output_file, 'w') as f_stream: with open(output_file, 'w') as f_stream:
......
...@@ -52,7 +52,7 @@ arguments: ...@@ -52,7 +52,7 @@ arguments:
output = download_skymodel_target(mss, SkymodelPath, Radius, DoDownload, Source) output = download_skymodel_target(mss, SkymodelPath, Radius, DoDownload, Source)
if SkymodelPath != "target.skymodel": if "target.skymodel" not in SkymodelPath:
shutil.copyfile(SkymodelPath, "target.skymodel") shutil.copyfile(SkymodelPath, "target.skymodel")
outputs: outputs:
......
...@@ -90,7 +90,7 @@ requirements: ...@@ -90,7 +90,7 @@ requirements:
hints: hints:
- class: DockerRequirement - class: DockerRequirement
dockerPull: lofareosc/prefactor:HBAcalibrator dockerPull: lofareosc/prefactor:HBAcalibrator
stdout: parm_collector_output.log stdout: h5parm_collector_output.log
stderr: parm_collector_output_err.log stderr: h5parm_collector_output_err.log
$schema: $schema:
- 'https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl' - 'https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl'
...@@ -48,12 +48,12 @@ outputs: ...@@ -48,12 +48,12 @@ outputs:
requirements: requirements:
- class: InlineJavascriptRequirement - class: InlineJavascriptRequirement
hints:
- class: InitialWorkDirRequirement - class: InitialWorkDirRequirement
listing: listing:
- entry: $(inputs.msin) - entry: $(inputs.msin)
writable: true writable: true
hints:
- class: DockerRequirement - class: DockerRequirement
dockerPull: lofareosc/prefactor:HBAcalibrator dockerPull: lofareosc/prefactor:HBAcalibrator
stdout: identifyBadAntennas.log stdout: identifyBadAntennas.log
stderr: identifyBadAntennas_err.log
\ No newline at end of file
...@@ -472,3 +472,4 @@ steps: ...@@ -472,3 +472,4 @@ steps:
requirements: requirements:
- class: SubworkflowFeatureRequirement - class: SubworkflowFeatureRequirement
- class: InlineJavascriptRequirement - class: InlineJavascriptRequirement
- class: StepInputExpressionRequirement
...@@ -72,6 +72,7 @@ steps: ...@@ -72,6 +72,7 @@ steps:
source: insolutions source: insolutions
- id: soltab_in - id: soltab_in
source: gsmcal_step source: gsmcal_step
valueFrom: $(self+'000')
- id: soltab_out - id: soltab_out
default: 'TGSSphase' default: 'TGSSphase'
- id: filter - id: filter
...@@ -171,3 +172,5 @@ steps: ...@@ -171,3 +172,5 @@ steps:
requirements: requirements:
- class: SubworkflowFeatureRequirement - class: SubworkflowFeatureRequirement
- class: ScatterFeatureRequirement - class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment