diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba19298f22d748c4f3132d499f3893ded92a68f4..7c35c120a3a96c7c11a62fe9a8f44f6c4c1b1d57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -115,6 +115,12 @@ losoto_smooth: script: - cwl-runner --no-container steps/LoSoTo.Smooth.cwl test_jobs/losoto_smooth.json +losoto_prefactor_bandpass: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.PrefactorBandpass.cwl test_jobs/losoto_prefactorbandpass.json + losoto_clip: stage: test_steps allow_failure: true diff --git a/steps/LoSoTo.PrefactorBandpass.cwl b/steps/LoSoTo.PrefactorBandpass.cwl new file mode 100644 index 0000000000000000000000000000000000000000..c81efdab366125e0c818a211e7dd3c06dda39dec --- /dev/null +++ b/steps/LoSoTo.PrefactorBandpass.cwl @@ -0,0 +1,101 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_prefactor_bandpass + +$namespaces: + lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl +doc: | + This operation for LoSoTo implements the Prefactor bandpass operation + WEIGHT: flag-only compliant, no need for weight + + +requirements: + InlineJavascriptRequirement: + expressionLib: + - { $include: utils.js} + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: $(get_losoto_config('PREFACTOR_BANDPASS').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: chanWidth + type: string? + doc: | + the width of each channel in the data from which solutions were obtained. Can be + either a string like "48kHz" or a float in Hz. If interpolate = True, chanWidth + must be specified + + - id: BadSBList + type: string? + doc: a list of bad subbands that will be flagged + + - id: outSoltabName + type: string? + doc: | + Name of the output bandpass soltab. An existing soltab with this name will be + overwritten + - id: interpolate + type: boolean? + default: false + doc: | + If True, interpolate to a regular frequency grid and then smooth, ignoring bad + subbands. If False, neither interpolation nor smoothing is done and the output + frequency grid is the same as the input one. If interpolate = True, chanWidth + must be specified + - id: removeTimeAxis + type: boolean? + doc: | + If True, the time axis of the output bandpass soltab is removed by doing a median + over time. If False, the output time grid is the same as the input one + - id: autoFlag + type: boolean? + doc: If True, automatically flag bad frequencies and stations + + - id: nSigma + type: float? + doc: Number of sigma for autoFlagging. Amplitudes outside of nSigma*stddev are flagged + + - id: maxFlaggedFraction + type: float? + doc: | + Maximum allowable fraction of flagged frequencies for autoFlagging. Stations with + higher fractions will be completely flagged + - id: maxStddev + type: float? + doc: Maximum allowable standard deviation for autoFlagging + + - id: ncpu + type: int? + doc: Number of CPUs to use during autoFlagging (0 = all) + +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_prefactorbandpass.json b/test_jobs/losoto_prefactorbandpass.json new file mode 100644 index 0000000000000000000000000000000000000000..0b34257ce0579a12b83e6da8e78eeaa7a8e8e565 --- /dev/null +++ b/test_jobs/losoto_prefactorbandpass.json @@ -0,0 +1,4 @@ +{ + "input_h5parm": {"class": "File", "path": "/data/example.h5", "format": "lofar:#H5Parm"}, + "soltab": "sol000/amplitude000" +}