diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0731b1da88d1e2f9c4ab3ff51648ed0a9bc7cbe..79e857311c1b020443f7e1b1220093ab4bf1d8fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,12 +46,20 @@ losoto_abs: allow_failure: true script: - cwl-runner --no-container steps/LoSoTo.Abs.cwl test_jobs/losoto_abs.json + losoto_plot: stage: test_steps allow_failure: true script: - cwl-runner --no-container steps/LoSoTo.Plot.cwl test_jobs/losoto_plot.json +losoto_norm: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.Norm.cwl test_jobs/losoto_norm.json + + parset_selector: stage: test_steps allow_failure: true @@ -99,7 +107,7 @@ h5parm_collector: allow_failure: true script: - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH steps/H5ParmCollector.cwl test_jobs/h5parm_collector.json - + blsmooth: stage: test_steps allow_failure: true diff --git a/steps/LoSoTo.Norm.cwl b/steps/LoSoTo.Norm.cwl new file mode 100644 index 0000000000000000000000000000000000000000..3a6c00db7afe768d06fd9d09a3b677cfe7e59935 --- /dev/null +++ b/steps/LoSoTo.Norm.cwl @@ -0,0 +1,53 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_abs + +doc: | + Normalize the solutions to a given value WEIGHT: Weights compliant + +requirements: + InlineJavascriptRequirement: {} + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: | + [norm] + soltab = $(inputs.soltab) + operation = NORM + axesToNorm = $(inputs.axesToNorm) + $(inputs.normVal !== null? 'normVal=' + inputs.normVal: '') + + - 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: axesToNorm + type: string[] + doc: Axes along which compute the normalization + - id: normVal + type: float? + doc: Number to normalize to vals = vals * (normVal/valsMean), by default 1. + +outputs: + - id: output_h5parm + type: File + outputBinding: + glob: $(inputs.input_h5parm.basename) diff --git a/test_jobs/losoto_norm.json b/test_jobs/losoto_norm.json new file mode 100644 index 0000000000000000000000000000000000000000..fad1ae92a9d3d2a5f40bbe5df6086194e15c1a40 --- /dev/null +++ b/test_jobs/losoto_norm.json @@ -0,0 +1,8 @@ +{ + "input_h5parm": { + "class": "File", + "path": "/data/example.h5" + }, + "soltab": "sol000/amplitude000", + "axesToNorm": ["time"] +}