diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0731b1da88d1e2f9c4ab3ff51648ed0a9bc7cbe..1c2ab1c69010466a5f8baef8f7c0457816582672 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,6 +52,12 @@ losoto_plot: script: - cwl-runner --no-container steps/LoSoTo.Plot.cwl test_jobs/losoto_plot.json +losoto_plotscreen: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.Plotscreen.cwl test_jobs/losoto_plotscreen.json + parset_selector: stage: test_steps allow_failure: true @@ -99,7 +105,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.Plotscreen.cwl b/steps/LoSoTo.Plotscreen.cwl new file mode 100644 index 0000000000000000000000000000000000000000..8e9df76d3736fcdd26dbe7b99dfcdde3eae4f43b --- /dev/null +++ b/steps/LoSoTo.Plotscreen.cwl @@ -0,0 +1,81 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_plotscreen + +doc: | + Plot screens (one plot is made per time and per station) + +requirements: + InlineJavascriptRequirement: + expressionLib: + - | + function get_config() { + var par = ['soltab = ' + inputs.soltab] + if (inputs.ncpu !== null) par.push('ncpu='+inputs.ncpu); + par.push('[plot]') + par.push('operation = PLOTSCREEN') + for(var field_name in inputs){ + if(field_name === 'input_h5parm' || + field_name === 'soltab' || + field_name === 'ncpu') continue; + if(inputs[field_name] === null) continue; + par.push(field_name+'='+inputs[field_name]) + } + return par + } + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: $(get_config().join('\n')) + - 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: "Tabs to plot" + - id: resSoltab + type: string? + doc: Soltab containing the screen residuals. + - id: minZ + type: float? + doc: Minimum value of colorbar scale. + - id: maxZ + type: float? + doc: Max value of colorbar scale. + - id: prefix + default: 'losoto.plotscreen.' + type: string? + doc: String to prepend to output plots. + - id: remove_gradient + type: boolean? + doc: If True, remove gradient before plotting. + - id: show_source_names + type: boolean? + doc: If True, source names are overplotted. + - id: ncpu + type: int? + doc: Number of CPUs to use. If 0, all are used. + + +outputs: + - id: output_plots + type: File[] + outputBinding: + glob: "$(inputs.prefix)*.png" diff --git a/test_jobs/losoto_plotscreen.json b/test_jobs/losoto_plotscreen.json new file mode 100644 index 0000000000000000000000000000000000000000..12a99054977035cf6a76edd034b69e5414e4603b --- /dev/null +++ b/test_jobs/losoto_plotscreen.json @@ -0,0 +1,5 @@ +{ + "input_h5parm": {"class": "File", "path": "/data/example.h5"}, + "soltab": ["sol000/amplitude000"], + "resSoltab": "amplitude000" +}