diff --git a/steps/DP3.DemixerStepGenerator.cwl b/steps/DP3.DemixerStepGenerator.cwl index caaa14ce8004716f969fb9b88f8589ba2a0167b9..c88bdd1721d9a544f872ef89f814c361eb56dee5 100755 --- a/steps/DP3.DemixerStepGenerator.cwl +++ b/steps/DP3.DemixerStepGenerator.cwl @@ -138,7 +138,7 @@ steps: source: steps - id: output_files default: ["instrumentmodel"] - + - id: parameters valueFrom: $(inputs) - id: step_id diff --git a/steps/DirSelector.cwl b/steps/DirSelector.cwl index 219bf744ab9a81513c31a2a8adc788d844a05f0a..d5bd04038a703c3ecfbc5f07aa917892b87bd85d 100644 --- a/steps/DirSelector.cwl +++ b/steps/DirSelector.cwl @@ -23,15 +23,15 @@ expression: | ${ var step_name = inputs.step_name var key_name = inputs.key_name - + if(inputs.inputs.hasOwnProperty(step_name)){ var inputs_per_step = inputs.inputs[step_name] if(inputs_per_step.hasOwnProperty(key_name)){ - return {'output': inputs_per_step[key_name]} + return {'output': inputs_per_step[key_name]} } } - return {'output': []} - + return {'output': []} + } label: DirSelector diff --git a/steps/H5ParmCollector.cwl b/steps/H5ParmCollector.cwl index fe6ba4745cfec57370bdafc88d5638afbcc7af1a..e2e33e20acab94f1e092866d37a2086185e93530 100755 --- a/steps/H5ParmCollector.cwl +++ b/steps/H5ParmCollector.cwl @@ -2,12 +2,18 @@ class: CommandLineTool cwlVersion: v1.0 $namespaces: sbg: 'https://www.sevenbridges.com/' + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl + id: h5parm_collector + baseCommand: - H5parm_collector.py inputs: - id: h5parmFiles type: 'File[]' + format: lofar:#H5Parm inputBinding: position: 0 doc: List of h5parm files @@ -23,7 +29,7 @@ inputs: type: string doc: Output h5parm name - id: squeeze - type: boolean + type: boolean default: false inputBinding: position: 0 @@ -47,6 +53,7 @@ outputs: - id: outh5parm doc: Output h5parm type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.outh5parmname) - id: log @@ -60,3 +67,4 @@ hints: stdout: $(inputs.outh5parmname)-parm_collector_output.log requirements: - class: InlineJavascriptRequirement + diff --git a/steps/LoSoTo.Abs.cwl b/steps/LoSoTo.Abs.cwl index ed41907754265e8f7d98e360ec3d9b84ff961a6c..43f5c28c5a5fd18157707d9ba273bd85c6620532 100755 --- a/steps/LoSoTo.Abs.cwl +++ b/steps/LoSoTo.Abs.cwl @@ -4,6 +4,8 @@ class: CommandLineTool cwlVersion: v1.0 id: losoto_abs +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl doc: | Take absolute value. Needed before smooth if amplitudes are negative! WEIGHT: no need to be weight compliant @@ -33,6 +35,7 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string doc: "Solution table" @@ -40,5 +43,10 @@ inputs: outputs: - id: output_h5parm type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.input_h5parm.basename) + + +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/LoSoTo.Duplicate.cwl b/steps/LoSoTo.Duplicate.cwl index 777f6a6bb66188a98af568ca10989fb133b2bded..9111602fa6ebde8aaca0b425afeef3c3d1e39d75 100644 --- a/steps/LoSoTo.Duplicate.cwl +++ b/steps/LoSoTo.Duplicate.cwl @@ -35,14 +35,22 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string doc: "Solution table" - - id: soltabOut + - id: soltabOut type: string? doc: Output table name. By default choose next available from table type. outputs: - id: output_h5parm type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.input_h5parm.basename) + + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/LoSoTo.Norm.cwl b/steps/LoSoTo.Norm.cwl index 3a6c00db7afe768d06fd9d09a3b677cfe7e59935..f60ee4c469c938e01c52b5d226e275bba4fe2a1f 100644 --- a/steps/LoSoTo.Norm.cwl +++ b/steps/LoSoTo.Norm.cwl @@ -36,6 +36,7 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string doc: "Solution table" @@ -49,5 +50,12 @@ inputs: outputs: - id: output_h5parm type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.input_h5parm.basename) + + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/LoSoTo.Plot.cwl b/steps/LoSoTo.Plot.cwl index c87748e4445e413ba188c41cebe7f2528a13709b..e5d5cfb054bbda082cf00a311d9df0904ea22f1f 100644 --- a/steps/LoSoTo.Plot.cwl +++ b/steps/LoSoTo.Plot.cwl @@ -49,6 +49,7 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string[] doc: "Tabs to plot" @@ -139,3 +140,9 @@ outputs: type: File[] outputBinding: glob: "$(inputs.prefix)*.png" + + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/LoSoTo.Replicateonaxis.cwl b/steps/LoSoTo.Replicateonaxis.cwl index 5a5bc2ae466530299dedb183962e484a7f5a4814..c676467d19611e57252c17bdfd83b99d8a5fc821 100644 --- a/steps/LoSoTo.Replicateonaxis.cwl +++ b/steps/LoSoTo.Replicateonaxis.cwl @@ -47,6 +47,7 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string doc: "Solution table" @@ -65,5 +66,12 @@ inputs: outputs: - id: output_h5parm type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.input_h5parm.basename) + + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/LoSoTo.Reset.cwl b/steps/LoSoTo.Reset.cwl index 149587c9e8c399f2324fdf640b82e0966ee21728..99594d12046ee2d48622dda0e08de72e25c8efcd 100644 --- a/steps/LoSoTo.Reset.cwl +++ b/steps/LoSoTo.Reset.cwl @@ -34,6 +34,7 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string doc: "Solution table" @@ -45,5 +46,12 @@ inputs: outputs: - id: output_h5parm type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.input_h5parm.basename) + + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/LoSoTo.Residual.cwl b/steps/LoSoTo.Residual.cwl index e8aed596c8b965648201b33f045c6842dd9fac9c..4bc566cd7d878f8532d69cd74aad7a6d4a72bf8b 100644 --- a/steps/LoSoTo.Residual.cwl +++ b/steps/LoSoTo.Residual.cwl @@ -2,7 +2,7 @@ class: CommandLineTool cwlVersion: v1.0 -id: losoto_abs +id: losoto_residual doc: Subtract/divide two tables or a clock/tec/tec3rd/rm from a phase. @@ -34,6 +34,7 @@ hints: inputs: - id: input_h5parm type: File + format: lofar:#H5Parm - id: soltab type: string doc: "Solution table" @@ -48,5 +49,11 @@ inputs: outputs: - id: output_h5parm type: File + format: lofar#H5Parm outputBinding: glob: $(inputs.input_h5parm.basename) + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/RadioDatatypes.yaml b/steps/RadioDatatypes.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0a1679541e2bf66a9bc447669dfd27a6d94c2ce1 --- /dev/null +++ b/steps/RadioDatatypes.yaml @@ -0,0 +1,8 @@ +type: array +name: MeasurementSet +label: The measurement set data location +items: + - name: main_directory + type: Directory + inputBinding: + position: 0 diff --git a/steps/blsmooth.cwl b/steps/blsmooth.cwl index 9d0c5dbb9c65f0b119a745b75894fb04f7131eb3..d139c594c6f1738109a4048f0abe7691c998d079 100644 --- a/steps/blsmooth.cwl +++ b/steps/blsmooth.cwl @@ -20,9 +20,9 @@ inputs: - id: do_smooth type: boolean doc: 'If true performs smoothing' - inputBinding: + inputBinding: prefix: '--smooth=SMOOTH' - + - default: 0.5 id: bscalefactor type: float diff --git a/steps/check_ateam_separation.cwl b/steps/check_ateam_separation.cwl index a7bcaf7e584454bea1f25d28ae89d4d9ece4a861..977d9f86e63f3b003833aee677d330f1f188253d 100755 --- a/steps/check_ateam_separation.cwl +++ b/steps/check_ateam_separation.cwl @@ -4,7 +4,7 @@ $namespaces: sbg: 'https://www.sevenbridges.com/' id: check_ateam_separation baseCommand: - - python3 + - python3 - /usr/local/bin/check_Ateam_separation.py inputs: - id: ms diff --git a/steps/ddecal.cwl b/steps/ddecal.cwl index 17830c4c3108231f45f9092f55eae9192dbe2439..c534d5362f563941d9503b980ae0dd6a4b766acf 100644 --- a/steps/ddecal.cwl +++ b/steps/ddecal.cwl @@ -7,7 +7,7 @@ baseCommand: [DPPP] requirements: InlineJavascriptRequirement: {} - + hints: DockerRequirement: dockerPull: lofareosc/prefactor-ci:master @@ -23,7 +23,7 @@ arguments: - ddecal.flagdivergedonly=True - ddecal.tolerance=1.e-3 - ddecal.usemodelcolumn=True - + inputs: - id: msin @@ -48,7 +48,7 @@ inputs: inputBinding: prefix: msin.modelcolumn= separate: false - + - id: output_name_h5parm type: string default: instrument.h5 @@ -62,7 +62,7 @@ inputs: inputBinding: prefix: msout= separate: false - + #-------------------- - id: propagate_solutions type: boolean @@ -101,5 +101,11 @@ outputs: - id: h5parm doc: Filename of output H5Parm (to be read by e.g. losoto) type: File + format: lofar:#H5Parm outputBinding: glob: $(inputs.output_name_h5parm) + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/steps/find_skymodel_cal.cwl b/steps/find_skymodel_cal.cwl index 2d7af826b317b721fc471ff7ac4ec90f3a9dc369..51a1dc4a8f7500fccac5cef763cd15d50ecaa505 100644 --- a/steps/find_skymodel_cal.cwl +++ b/steps/find_skymodel_cal.cwl @@ -26,7 +26,7 @@ arguments: from unittest.mock import MagicMock sys.modules['lofarpipe.support.data_map'] = MagicMock() - + from find_skymodel_cal import main as find_skymodel import json diff --git a/steps/msinfo.cwl b/steps/msinfo.cwl new file mode 100644 index 0000000000000000000000000000000000000000..0c7e2f5b779360baef059c0fe61f753a428d8707 --- /dev/null +++ b/steps/msinfo.cwl @@ -0,0 +1,40 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.1 +id: msinfo + +requirements: + - class: InlineJavascriptRequirement + - class: InitialWorkDirRequirement + listing: + - entryname: msinfo.py + entry: | + import sys + print(sys.argv) + - class: SchemaDefRequirement + types: + - $import: RadioDatatypes.yaml +hints: + DockerRequirement: + dockerPull: lofareosc/prefactor-ci:master + +baseCommand: + - python3 + - msinfo.py + +inputs: + data: + type: RadioDatatypes.yaml#MeasurementSet + inputBinding: + position: 0 + +stdout: std.output + +outputs: + info: + type: File + outputBinding: + glob: std.output +label: msinfo + diff --git a/steps/wsclean.cwl b/steps/wsclean.cwl index c4740821e549452afdf9cea033a2acaef32a6240..2bb63f2066cf8237103211ced00a92b2c5c33170 100644 --- a/steps/wsclean.cwl +++ b/steps/wsclean.cwl @@ -20,14 +20,14 @@ inputs: - id: image_name default: image type: string - inputBinding: + inputBinding: position: 1 prefix: -name - id: msin type: Directory inputBinding: position: 2 -outputs: +outputs: dirty_image: type: File outputBinding: diff --git a/test_jobs/h5parm_collector.json b/test_jobs/h5parm_collector.json index 958493f2d5d8a497720e0cd2a5dfa048be960d09..42c60bb8d15f9f8e49673c916c7d19cec07ae35a 100644 --- a/test_jobs/h5parm_collector.json +++ b/test_jobs/h5parm_collector.json @@ -2,7 +2,8 @@ "h5parmFiles": [ { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" } ] } diff --git a/test_jobs/losoto_abs.json b/test_jobs/losoto_abs.json index ff1cfa0ffb800683bec498e1b97949b3383b6a1d..a283362c08eefe03c690a9a3ad3791dbf4ed74bc 100644 --- a/test_jobs/losoto_abs.json +++ b/test_jobs/losoto_abs.json @@ -1,7 +1,8 @@ { "input_h5parm": { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" }, "soltab": "sol000/amplitude000" } diff --git a/test_jobs/losoto_duplicate.json b/test_jobs/losoto_duplicate.json index ff1cfa0ffb800683bec498e1b97949b3383b6a1d..a283362c08eefe03c690a9a3ad3791dbf4ed74bc 100644 --- a/test_jobs/losoto_duplicate.json +++ b/test_jobs/losoto_duplicate.json @@ -1,7 +1,8 @@ { "input_h5parm": { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" }, "soltab": "sol000/amplitude000" } diff --git a/test_jobs/losoto_norm.json b/test_jobs/losoto_norm.json index fad1ae92a9d3d2a5f40bbe5df6086194e15c1a40..d6d689949f55ce2c769956e474508c78c7c28f32 100644 --- a/test_jobs/losoto_norm.json +++ b/test_jobs/losoto_norm.json @@ -1,7 +1,8 @@ { "input_h5parm": { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" }, "soltab": "sol000/amplitude000", "axesToNorm": ["time"] diff --git a/test_jobs/losoto_plot.json b/test_jobs/losoto_plot.json index f4ed8634385489ed89ebc99ceed0c1509d127172..1316e959d7b7af2e331e320f412a16357d69643d 100644 --- a/test_jobs/losoto_plot.json +++ b/test_jobs/losoto_plot.json @@ -1,5 +1,5 @@ { - "input_h5parm": {"class": "File", "path": "/data/example.h5"}, + "input_h5parm": {"class": "File", "path": "/data/example.h5", "format": "lofar:#H5Parm"}, "soltab": ["sol000/phase000"], "axesInPlot": ["time"], "ncpu": 1 diff --git a/test_jobs/losoto_replicateonaxis.json b/test_jobs/losoto_replicateonaxis.json index c450feeb21cb430c6a5184f3e18d80d36653130c..0abfc35d9280bdc84605590f00479a9b5d36d7c6 100644 --- a/test_jobs/losoto_replicateonaxis.json +++ b/test_jobs/losoto_replicateonaxis.json @@ -1,7 +1,8 @@ { "input_h5parm": { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" }, "soltab": "sol000/amplitude000", "axisReplicate": "time", diff --git a/test_jobs/losoto_reset.json b/test_jobs/losoto_reset.json index ff1cfa0ffb800683bec498e1b97949b3383b6a1d..2d773afb6baa7bb4d83c8fe0d85becf472b54f69 100644 --- a/test_jobs/losoto_reset.json +++ b/test_jobs/losoto_reset.json @@ -1,7 +1,8 @@ { "input_h5parm": { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" }, "soltab": "sol000/amplitude000" } diff --git a/test_jobs/losoto_residual.json b/test_jobs/losoto_residual.json index 86b97d57348f716e4ffbc4399c02b4b1f038ba38..4a56f1c6e77dcb29aac66414ba1cb19253597bd6 100644 --- a/test_jobs/losoto_residual.json +++ b/test_jobs/losoto_residual.json @@ -1,7 +1,8 @@ { "input_h5parm": { "class": "File", - "path": "/data/example.h5" + "path": "/data/example.h5", + "format": "lofar:#H5Parm" }, "soltab": "sol000/amplitude000", "soltabsToSub": ["amplitude000"]