From b47f3f65bb32c605d522d994614d1ccf6e671548 Mon Sep 17 00:00:00 2001 From: mancini <mancini@astron.nl> Date: Fri, 8 Nov 2019 18:01:43 +0100 Subject: [PATCH] Add LoSoTo residual step --- .gitlab-ci.yml | 5 ++++ steps/LoSoTo.Residual.cwl | 52 ++++++++++++++++++++++++++++++++++ test_jobs/losoto_residual.json | 8 ++++++ 3 files changed, 65 insertions(+) create mode 100644 steps/LoSoTo.Residual.cwl create mode 100644 test_jobs/losoto_residual.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79e85731..66cfc5bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,6 +59,11 @@ losoto_norm: script: - cwl-runner --no-container steps/LoSoTo.Norm.cwl test_jobs/losoto_norm.json +losoto_residual: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.Residual.cwl test_jobs/losoto_residual.json parset_selector: stage: test_steps diff --git a/steps/LoSoTo.Residual.cwl b/steps/LoSoTo.Residual.cwl new file mode 100644 index 00000000..e8aed596 --- /dev/null +++ b/steps/LoSoTo.Residual.cwl @@ -0,0 +1,52 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_abs + +doc: Subtract/divide two tables or a clock/tec/tec3rd/rm from a phase. + +requirements: + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: | + [residuals] + soltab = $(inputs.soltab) + operation=RESIDUALS + soltabsToSub=$(inputs.soltabsToSub) + ratio=$(inputs.ratio) + + - entryname: $(inputs.input_h5parm.basename) + entry: $(inputs.input_h5parm) + writable: true + +baseCommand: "losoto" + +arguments: + - $(inputs.input_h5parm.basename) + - parset.config + +hints: + DockerRequirement: + dockerPull: lofareosc/prefactor-ci:master + +inputs: + - id: input_h5parm + type: File + - id: soltab + type: string + doc: "Solution table" + - id: soltabsToSub + type: string[] + doc: List of soltabs to subtract + - id: ratio + type: boolean? + default: false + doc: Return the ratio instead of subtracting. + +outputs: + - id: output_h5parm + type: File + outputBinding: + glob: $(inputs.input_h5parm.basename) diff --git a/test_jobs/losoto_residual.json b/test_jobs/losoto_residual.json new file mode 100644 index 00000000..86b97d57 --- /dev/null +++ b/test_jobs/losoto_residual.json @@ -0,0 +1,8 @@ +{ + "input_h5parm": { + "class": "File", + "path": "/data/example.h5" + }, + "soltab": "sol000/amplitude000", + "soltabsToSub": ["amplitude000"] +} -- GitLab