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

Add LoSoTo Flag step

parent d1ad8a9e
No related branches found
No related tags found
1 merge request!69Change the name of the pre-calibrated output MS
......@@ -86,7 +86,11 @@ losoto_plot:
allow_failure: true
script:
- cwl-runner --no-container steps/LoSoTo.Plot.cwl test_jobs/losoto_plot.json
losoto_flag:
stage: test_steps
allow_failure: true
script:
- cwl-runner --no-container steps/LoSoTo.Flag.cwl test_jobs/losoto_flag.json
losoto_norm:
stage: test_steps
allow_failure: true
......
#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.0
id: losoto_flag
$namespaces:
lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
doc: |
This operation for LoSoTo implement a flagging procedure
WEIGHT: compliant
requirements:
InlineJavascriptRequirement:
expressionLib:
- { $include: utils.js}
InitialWorkDirRequirement:
listing:
- entryname: 'parset.config'
entry: $(get_losoto_config('FLAG').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: axesToFlag
type: string[]
doc: Axes along which to smooth+find outlier (e.g. ['time', 'freq']), max 2 values.
- id: order
type: int[]
doc: |
Order of the function fitted during detrending.
Array must have same size of axesToFlag.
If mode=smooth these are the window of the running median (0=all axis).
- id: maxCycles
type: int?
doc: Max number of independent flagging cycles, by default 5.
- id: maxRms
type: float?
doc: Rms to clip outliers, by default 5.
- id: maxRmsNoise
type: float?
doc: |
Do a running rms and then flag those regions that have a rms higher
than MaxRmsNoise*rms_of_rmses, by default 0 (ignored).
- id: fixRms
type: float?
doc: Instead of calculating rms use this value, by default 0 (ignored).
- id: fixRmsNoise
type: float?
doc: |
Instead of calculating rms of the rmses use this value
(it will not be multiplied by the MaxRmsNoise), by default 0 (ignored).
- id: windowNoise
type: int?
doc: Window size for the running rms, by default 11.
- id: replace
type: boolean?
doc: |
Replace bad values with the interpolated ones,
instead of flagging them. By default False.
- id: preflagzeros
type: boolean?
doc:
Flag zeros/ones (bad solutions in BBS/DPPP).
They should be flagged at import time. By default False.
- id: mode
type: string?
doc: |
Detrending/fitting algorithm: smooth / poly / spline.
By default smooth.
- id: refAnt
type: string?
doc: Reference antenna, by default None.
- id: ncpu
type: int?
doc: Number of cpu to use, by default all available.
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
{
"input_h5parm": {"class": "File", "path": "/data/example.h5", "format": "lofar:#H5Parm"},
"soltab": "sol000/phase000",
"axesToFlag": ["time"],
"order": [0]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment