diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c82d6225c0815a988d4036736ccf358e2408667..5e94a0757f1e4a7d52fe17ff3402717284ebff99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,11 @@ losoto_faraday: script: - cwl-runner --no-container steps/LoSoTo.Faraday.cwl test_jobs/losoto_faraday.json +losoto_interpolate: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.Interpolate.cwl test_jobs/losoto_interpolate.json losoto_residual: stage: test_steps allow_failure: true diff --git a/steps/LoSoTo.Interpolate.cwl b/steps/LoSoTo.Interpolate.cwl new file mode 100644 index 0000000000000000000000000000000000000000..aa956ebff87c5e84f349fb1263432687346a13df --- /dev/null +++ b/steps/LoSoTo.Interpolate.cwl @@ -0,0 +1,82 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_interpolate + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +doc: | + This operation for LoSoTo implements regridding and linear interpolation of data for an axis. + WEIGHT: compliant + + + + +requirements: + InlineJavascriptRequirement: + expressionLib: + - { $include: utils.js} + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: $(get_losoto_config('INTERPOLATE').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/lofar-pipeline-ci:latest + +inputs: + - id: input_h5parm + type: File + format: lofar:#H5Parm + - id: soltab + type: string + doc: "Solution table" + + - id: axisToRegrid + type: string + doc: Name of the axis for which regridding/interpolation will be done + - id: outSoltab + type: string + doc: Output sol tab name + - id: newdelta + type: 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: boolean? + doc: Interpolation is done in log10 space, by default False + + +outputs: + - id: output_h5parm + type: File + format: lofar:#H5Parm + outputBinding: + glob: $(inputs.input_h5parm.basename) +$schema: + - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl diff --git a/test_jobs/losoto_interpolate.json b/test_jobs/losoto_interpolate.json new file mode 100644 index 0000000000000000000000000000000000000000..327302ee99b8bcfe9afa379bfe1fd59b986827ba --- /dev/null +++ b/test_jobs/losoto_interpolate.json @@ -0,0 +1,7 @@ +{ + "input_h5parm": {"class": "File", "path": "/data/example.h5", "format": "lofar:#H5Parm"}, + "soltab": "sol000/phase000", + "axisToRegrid": "time", + "newdelta": "1s", + "outSoltab": "timeout" +}