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

Add interpolate step

parent a4dd6750
No related branches found
No related tags found
No related merge requests found
#!/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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment