Skip to content
Snippets Groups Projects
Commit 2a23c0e1 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Adds if execute plot generation

parent 9f7fe4db
No related branches found
No related tags found
2 merge requests!69Change the name of the pre-calibrated output MS,!20Merge request HBA_calibrator to master
Pipeline #1389 failed
...@@ -19,13 +19,25 @@ requirements: ...@@ -19,13 +19,25 @@ requirements:
- entryname: $(inputs.input_h5parm.basename) - entryname: $(inputs.input_h5parm.basename)
entry: $(inputs.input_h5parm) entry: $(inputs.input_h5parm)
writable: true writable: true
- entryname: run_losoto_plot.sh
entry: |
#!/bin/bash
set -e
INPUT_H5PARM=$(inputs.input_h5parm.basename)
DO_PLOTS=$(inputs.execute)
if [ DO_PLOT ] do
losoto --verbose $INPUT_H5PARM parset.config
else
echo Skipped plotting
fi
baseCommand: "losoto" baseCommand: "losoto"
arguments: arguments:
- '--verbose' - '--verbose'
- $(inputs.input_h5parm.basename) -
- parset.config - parset.config
hints: hints:
...@@ -36,10 +48,14 @@ inputs: ...@@ -36,10 +48,14 @@ inputs:
- id: input_h5parm - id: input_h5parm
type: File type: File
format: lofar:#H5Parm format: lofar:#H5Parm
- id: execute
type: boolean?
default: true
- id: soltab - id: soltab
type: string type: string
doc: "Tabs to plot" doc: "Tabs to plot"
- id: axesInPlot - id: axesInPlot
type: string[]? type: string[]?
default: [] default: []
...@@ -127,7 +143,7 @@ inputs: ...@@ -127,7 +143,7 @@ inputs:
outputs: outputs:
- id: output_plots - id: output_plots
type: File[] type: File[]?
outputBinding: outputBinding:
glob: "$(inputs.prefix)*.png" glob: "$(inputs.prefix)*.png"
- id: logfile - id: logfile
......
...@@ -7,7 +7,8 @@ function get_losoto_config(step_name) { ...@@ -7,7 +7,8 @@ function get_losoto_config(step_name) {
for(var field_name in inputs){ for(var field_name in inputs){
if(field_name === 'input_h5parm' || if(field_name === 'input_h5parm' ||
field_name === 'soltab' || field_name === 'soltab' ||
field_name === 'ncpu') continue; field_name === 'ncpu' ||
field_name === 'execute') continue;
if(inputs[field_name] === null || if(inputs[field_name] === null ||
inputs[field_name] === 'null') continue; inputs[field_name] === 'null') continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment