diff --git a/steps/LoSoTo.Interpolate.cwl b/steps/LoSoTo.Interpolate.cwl new file mode 100644 index 0000000000000000000000000000000000000000..2e7e6772802656c83237184eb54720a7c82a023b --- /dev/null +++ b/steps/LoSoTo.Interpolate.cwl @@ -0,0 +1,90 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_abs + +doc: | + Take absolute value. Needed before smooth if amplitudes are negative! + WEIGHT: no need to be weight compliant + +requirements: +InlineJavascriptRequirement: + expressionLib: + - | + function get_config() { + var par = ['soltab = ' + inputs.soltab] + if (inputs.ncpu !== null) par.push('ncpu='+inputs.ncpu); + par.push('[interpolate]') + par.push('operation = INTERPOLATE') + for(var field_name in inputs){ + if(field_name === 'input_h5parm' || + field_name === 'soltab' || + field_name === 'ncpu') continue; + if(inputs[field_name] === null || + 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: "Solution table" + - id: outsoltab + type: string + doc: "Name of output soltab" + - id: axisToRegrid + type: string + doc: | + Name of the axis for which regridding/interpolation will be done + - id: newdelta + type: + - float + - string + doc: | + Fundamental width between samples after regridding. + E.g., “100kHz” or “10s” + - id: delta + type: string? + doc: | + Fundamental width between samples in axisToRegrid. + E.g., “100kHz” or “10s”. If “”, it is calculated from the axisToRegrid + values + - id: maxFlaggedWidth + type: int? + doc: | + Maximum allowable width in number of samples (after regridding) above + which interpolated values are flagged (e.g., maxFlaggedWidth = 5 would + allow gaps of 5 samples or less to be interpolated across but gaps of 6 + or more would be flagged) + - id: log + type: bool + default: false + doc: | + Interpolation is done in log10 space, by default False +outputs: + - id: output_h5parm + type: File + outputBinding: + glob: $(inputs.input_h5parm.basename)