diff --git a/steps/PreflaggingStepGenerator.cwl b/steps/PreflaggingStepGenerator.cwl new file mode 100755 index 0000000000000000000000000000000000000000..e07950583cc818c46d09d6f465aa079d2eb619b2 --- /dev/null +++ b/steps/PreflaggingStepGenerator.cwl @@ -0,0 +1,232 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: average_step_generator +baseCommand: [parset_concat.py] + +requirements: + DockerRequirement: + dockerPull: prefactor-utils:latest + +arguments: ['preflagger'] + +inputs: + - id: parset + type: File + inputBinding: + position: -1 + prefix: --input_parset + - id: step_name + type: string + default: average + doc: unique name for the step + inputBinding: + position: -1 + - id: secondary_files + type: File[] + doc: Files other than the input used to process the data + +############################################################################### + + + - id: count.save + type: boolean + default: false + doc: If true, the flag percentages per frequency are saved to a table with extension .flagfreq and percentages per station to a table with extension .flagstat. The basename of the table is the MS name (without extension) followed by the stepname and extension. + inputBinding: + prefix: <step>.count.save= + separate: false + - id: count.path + type: string + default: '' + doc: The directory where to create the flag percentages table. If empty, the path of the input MS is used. + inputBinding: + prefix: count.path= + separate: false + - id: mode + type: string + default: set + doc: Case-insensitive string telling what to do with the flags of the data matching (or not matching) the selection criteria given in the other parameters. + inputBinding: + prefix: mode= + separate: false + - id: expr + type: string + default: [] + doc: 'Expression of preflagger keyword sets (see above). Operators AND, OR, and NOT are possible (or their equivalents &&,&, ||, |, and !). Parentheses can be used to change precedence order. For example:: c1 and (c2 or c3)' + inputBinding: + prefix: expr= + separate: false + - id: timeofday + type: string + default: [] + doc: Ranges of UTC time-of-day given as st..end or val+-delta. Each value must be given as 12:34:56.789, 12h34m56.789, or as a value followed by a unit like h, min, or s. + inputBinding: + prefix: timeofday= + separate: false + - id: abstime + type: string + default: '[]' + doc: Ranges of absolute UTC date/time given as st..end or val+-delta. Each value (except delta) must be given as a date/time in casacore MVTime format, for instance 12-Mar-2010/11:31:00.000. A delta value must be given as a time (for instance 1:30:0 or 20s). + inputBinding: + prefix: abstime= + separate: false + - id: reltime + type: string + default: '[]' + doc: Ranges of times (using .. or +-) since the start of the observation. A time can be given like 1:30:0 or 20s. + inputBinding: + prefix: reltime= + separate: false + - id: timeslot + type: string + default: '[]' + doc: Time slot sequence numbers. First time slot is 0. st..end means end inclusive. + inputBinding: + prefix: timeslot= + separate: false + - id: lst + type: string[] + default: [] + doc: Ranges of Local Apparent Sidereal Times like 1:30:0 +- 20min. The LST of a time slot is calculated for the array position, thus not per antenna. + inputBinding: + prefix: lst= + separate: false + - id: azimuth + type: float[] + default: [] + doc: Ranges of azimuth angles given as st..end or val+-delta. Each value has to be given as a casacore direction like 12:34:56.789 or 12h34m56.789, 12.34.56.789 or 12d34m56.789, or a value followed by a unit like rad or deg. + inputBinding: + prefix: azimuth= + separate: false + - id: elevation + type: float[] + default: [] + doc: 'Ranges of elevation angles (similar to azimuth). For example:: 0deg..10deg' + inputBinding: + prefix: elevation= + separate: false + - id: baseline + type: string[] + default: '' + doc: See Description of baseline selection parameters. + inputBinding: + prefix: baseline= + separate: false + - id: corrtype + type: string + default: '' + doc: Correlation type to match? Must be auto, cross, or an empty string. + inputBinding: + prefix: corrtype= + separate: false + - id: blmin + type: double + default: -1 + doc: If blmin > 0, baselines with length < blmin meter will match. + inputBinding: + prefix: blmin= + separate: false + - id: blmax + type: double + default: -1 + doc: If blmax > 0, baselines with length > blmax meter will match. + inputBinding: + prefix: blmax= + separate: false + - id: uvmmin + type: double + default: -1 + doc: If uvmmin > 0, baselines with UV-distance < uvmmin meter will match. Note that the UV-distance is the projected baseline length. + inputBinding: + prefix: uvmmin= + separate: false + - id: uvmmax + type: double + default: -1 + doc: If uvmmax > 0, baselines with UV-distance > uvmmax meter will match. + inputBinding: + prefix: uvmmax= + separate: false + - id: freqrange + type: string + default: [] + doc: 'Channels in the given frequency ranges will match. Each value in the vector is a range which can be given as start..end or start+-delta. A value can be followed by a unit like KHz. If only one value in a range has a unit, the unit is also applied to the other value. If a range has no unit, it defaults to MHz. For example: freqrange=[1.2 .. 1.4 MHz, 1.8MHz+-50KHz] flags channels between 1.2MHz and 1.4MHz and between 1.75MHz and 1.85MHz. The example shows that blanks can be used at will.' + inputBinding: + prefix: freqrange= + separate: false + - id: chan + type: string + default: [] + doc: 'The given channels will match (start counting at 0). Channels exceeding the number of channels are ignored. Similar to msin, it is possible to specify the channels as an expression of nchan. Furthermore, .. can be used to specify ranges. For example: chan=[0..nchan/32-1, 31*nchan/32..nchan-1] to flag the first and last 2 or 8 channels (depending on 64 or 256 channels in the observation).' + inputBinding: + prefix: chan= + separate: false + - id: amplmin + type: float + default: -1.e30 + doc: "Correlation data with amplitude < amplmin will match. It can be given per correlation. For example, amplmin=[100,,,100] matches data points with XX or YY amplitude < 100. The non-specified amplitudes get the default value." + inputBinding: + prefix: amplmin= + separate: false + - id: amplmax + type: float + default: 1e+030 + doc: Correlation data with amplitude > amplmax will match. + inputBinding: + prefix: amplmax= + separate: false + - id: phasemin + type: float + default: -1.e30 + doc: Correlation data with phase < phasemin (in radians) will match. + inputBinding: + prefix: phasemin= + separate: false + - id: phasemax + type: float + default: +1.e30 + doc: Correlation data with phase > phasemax (in radians) will match. + inputBinding: + prefix: phasemax= + separate: false + - id: realmin + type: float + default: -1.e30 + doc: Correlation data with real complex part < realmin will match. + inputBinding: + prefix: realmin= + separate: false + - id: realmax + type: float + default: 1.e30 + doc: Correlation data with real complex part > realmax will match. + inputBinding: + prefix: realmax= + separate: false + - id: imagmin + type: float + default: -1.e+30 + doc: Correlation data with imaginary complex part < imagmin will match. + inputBinding: + prefix: imagmin= + separate: false + - id: imagmax + type: float + default: 1.e+30 + doc: Correlation data with imaginary complex part > imagmax will match. + inputBinding: + prefix: imagmax= + separate: false + +outputs: + - id: output_parset + doc: Parset output file + type: stdout + + - id: secondary_files + doc: files needed to execute the step + type: File[] + outputBinding: + outputEval: $(inputs.secondary_files)