Skip to content
Snippets Groups Projects
Commit 9f7fe4db authored by alex's avatar alex
Browse files

add ion step

parent 86c94e94
No related branches found
No related tags found
2 merge requests!69Change the name of the pre-calibrated output MS,!20Merge request HBA_calibrator to master
Pipeline #1380 failed
#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.0
id: losoto_clocktec
$namespaces:
lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
doc: |
Separate phase solutions into Clock and TEC.
The Clock and TEC values are stored in the specified output soltab with type 'clock', 'tec', 'tec3rd'.
requirements:
InlineJavascriptRequirement:
expressionLib:
- { $include: utils.js}
InitialWorkDirRequirement:
listing:
- entryname: 'parset.config'
entry: $(get_losoto_config('CLOCKTEC').join('\n'))
- entryname: $(inputs.input_h5parm.basename)
entry: $(inputs.input_h5parm)
writable: true
baseCommand: "losoto"
arguments:
- '--verbose'
- $(inputs.input_h5parm.basename)
- parset.config
hints:
DockerRequirement:
dockerPull: lofareosc/prefactor:HBAcalibrator
inputs:
- id: input_h5parm
type: File
format: lofar:#H5Parm
- id: soltab
type: string
doc: "Solution table"
- id: clocksoltabOut
doc: output soltab name for clock
type: string?
- id: tecsoltabOut
doc: output soltab name for tec
type: string?
- id: offsetsoltabOut
doc: output soltab name for phase offset
type: string?
- id: tec3rdsoltabOut
doc: output soltab name for tec3rd offset
type: string?
- id: flagBadChannels
type: boolean?
doc: Detect and remove bad channel before fitting, by default True.
- id: flagCut
type: float?
- id: chi2cut
type: float?
- id: combinePol
type: boolean?
doc: |
Find a combined polarization solution, by default False.
- id: removePhaseWraps
type: boolean?
doc: |
Detect and remove phase wraps, by default True.
- id: fit3rdorder
type: boolean?
doc: |
Fit a 3rd order ionospheric ocmponent (usefult <40 MHz). By default False.
- id: circular
type: boolean?
doc: |
Assume circular polarization with FR not removed. By default False.
- id: reverse
type: boolean?
doc:
Reverse the time axis. By default False.
- id: invertOffset
type: boolean?
doc: |
Invert (reverse the sign of) the phase offsets. By default False. Set to True
if you want to use them with the residuals operation.
outputs:
- id: output_h5parm
type: File
format: lofar:#H5Parm
outputBinding:
glob: $(inputs.input_h5parm.basename)
- id: log
type: File[]
outputBinding:
glob: '$(inputs.input_h5parm.basename)-losoto*.log'
stdout: $(inputs.input_h5parm.basename)-losoto.log
stderr: $(inputs.input_h5parm.basename)-losoto_err.log
$schema:
- https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
class: Workflow
cwlVersion: v1.0
id: losoto_ion
label: losoto_ion
$namespaces:
sbg: 'https://www.sevenbridges.com/'
inputs:
- id: input_h5parm
type: File
'sbg:x': -588.3988647460938
'sbg:y': -147.5
- id: fit3rdorder
type: boolean?
'sbg:x': 83.60113525390625
'sbg:y': 53.5
- id: refAnt
type: string?
'sbg:x': 500.74346923828125
'sbg:y': -382.8847351074219
- id: maxStddev
type: float?
'sbg:x': 374.1950988769531
'sbg:y': -308.9609069824219
outputs:
- id: output_h5parm
outputSource:
- losoto_flagstation/output_h5parm
type: File
'sbg:x': 775
'sbg:y': -169
- id: logfiles
outputSource:
- flag/log
- flagextend/log
- merge/log
- flagextend/log
- merge/log
- duplicatePbkp/log
- losoto_clocktec/log
- smooth/logfile
- losoto_residual/log
- losoto_flagstation/log
type: 'File[]'
linkMerge: merge_flattened
'sbg:x': 775
'sbg:y': 169
steps:
- id: flag
in:
- id: input_h5parm
source: input_h5parm
- id: soltab
default: sol000/amplitude000
- id: axesToFlag
default:
- time
- freq
- id: order
default:
- 100
- 40
- id: maxCycles
default: 1
- id: maxRms
default: 5
- id: mode
default: smooth
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.Flag.cwl
'sbg:x': -442.3984375
'sbg:y': -138.5
- id: flagextend
in:
- id: input_h5parm
source: flag/output_h5parm
- id: soltab
default: sol000/amplitude000
- id: axesToExt
default:
- time
- freq
- id: size
default:
- 200
- 80
- id: percent
default: 50
- id: maxCycles
default: 2
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.Flagextend.cwl
'sbg:x': -255
'sbg:y': -160
- id: merge
in:
- id: input_h5parm
source: flagextend/output_h5parm
- id: soltab
default: sol000/phase000
- id: mode
default: copy
- id: soltabImport
default: amplitude000
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.Reweight.cwl
'sbg:x': -94
'sbg:y': -162
- id: duplicatePbkp
in:
- id: input_h5parm
source: merge/output_h5parm
- id: soltab
default: sol000/phase000
- id: soltabOut
default: phaseOrig
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.Duplicate.cwl
'sbg:x': 69
'sbg:y': -162
- id: losoto_flagstation
in:
- id: input_h5parm
source: losoto_residual/output_h5parm
- id: soltab
default: sol000/phase000
- id: mode
default: bandpass
- id: maxStddev
source: maxStddev
- id: refAnt
source: refAnt
- id: soltabExport
default: clock
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.FlagStation.cwl
'sbg:x': 587
'sbg:y': -172
- id: losoto_clocktec
in:
- id: input_h5parm
source: duplicatePbkp/output_h5parm
- id: soltab
default: sol000/phase000
- id: clocksoltabOut
default: clock
- id: tecsoltabOut
default: tec
- id: offsetsoltabOut
default: phase_offset
- id: tec3rdsoltabOut
default: tec3rd
- id: combinePol
default: true
- id: fit3rdorder
source: fit3rdorder
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.ClockTec.cwl
'sbg:x': 217.72296142578125
'sbg:y': -230.69259643554688
- id: smooth
in:
- id: input_h5parm
source: losoto_clocktec/output_h5parm
- id: soltab
default: sol000/clock
- id: axesToSmooth
default:
- time
- id: mode
default: median
- id: replace
default: true
- id: log
default: false
out:
- id: output_h5parm
- id: logfile
run: ../lofar-cwl/steps/LoSoTo.Smooth.cwl
'sbg:x': 301.4368591308594
'sbg:y': -51.11399841308594
- id: losoto_residual
in:
- id: input_h5parm
source: smooth/output_h5parm
- id: soltab
default: sol000/phase000
- id: soltabsToSub
source:
- fit3rdorder
valueFrom: '$(self ? ["tec", "clock", "tec3rd"] : ["tec", "clock"])'
out:
- id: output_h5parm
- id: log
run: ../lofar-cwl/steps/LoSoTo.Residual.cwl
'sbg:x': 411.0426330566406
'sbg:y': -168.98934936523438
requirements: []
......@@ -170,26 +170,21 @@ inputs:
type: File?
'sbg:x': -1000
'sbg:y': 1500
- id: cal_solutions
type: string?
default: cal_solutions.h5
'sbg:x': -1000
'sbg:y': 1600
- id: avg_timeresolution
type: float?
default: 4
'sbg:x': -1000
'sbg:y': 1700
'sbg:y': 1600
- id: avg_freqresolution
type: string?
default: 48.82kHz
'sbg:x': -1000
'sbg:y': 1800
'sbg:y': 1700
- id: bandpass_freqresolution
type: string?
default: 195.3125kHz
'sbg:x': -1000
'sbg:y': 1900
'sbg:y': 1800
outputs:
- id: solutions
outputSource:
......@@ -294,8 +289,6 @@ steps:
source: calibrator_path_skymodel
- id: A-Team_skymodel
source: A-Team_skymodel
- id: cal_solutions
source: cal_solutions
- id: avg_timeresolution
source: avg_timeresolution
- id: avg_freqresolution
......
......@@ -170,26 +170,21 @@ inputs:
type: File?
'sbg:x': -1000
'sbg:y': 1500
- id: cal_solutions
type: string?
default: cal_solutions.h5
'sbg:x': -1000
'sbg:y': 1600
- id: avg_timeresolution
type: float?
default: 4
'sbg:x': -1000
'sbg:y': 1700
'sbg:y': 1600
- id: avg_freqresolution
type: string?
default: 48.82kHz
'sbg:x': -1000
'sbg:y': 1800
'sbg:y': 1700
- id: bandpass_freqresolution
type: string?
default: 195.3125kHz
'sbg:x': -1000
'sbg:y': 1900
'sbg:y': 1800
outputs:
- id: inspection
linkMerge: merge_flattened
......@@ -198,12 +193,13 @@ outputs:
- pa/inspection
- fr/inspection
- bp/inspection
- ion/inspection
type: File[]
'sbg:x': 2000
'sbg:y': -600
- id: solutions
outputSource:
- bp/outsolutions
- ion/outsolutions
type: File
'sbg:x': 2000
'sbg:y': -500
......@@ -225,6 +221,7 @@ outputs:
- pa/logfiles
- fr/logfiles
- bp/logfiles
- ion/logfiles
type: 'File[]'
linkMerge: merge_flattened
'sbg:x': 2000
......@@ -403,5 +400,31 @@ steps:
label: BP
'sbg:x': 1000
'sbg:y': 0
- id: ion
in:
- id: h5parm
source:
- bp/outh5parm
- id: refant
source: refant
- id: inh5parm_logfile
source:
- bp/outh5parm_logfile
- id: insolutions
source: bp/outsolutions
- id: maxStddev
source: maxStddev
- id: ion_3rd
source: ion_3rd
- id: tables2export
source: tables2export
out:
- id: outsolutions
- id: inspection
- id: logfiles
run: ./prefactor_calibrator/ion.cwl
label: ion
'sbg:x': 1300
'sbg:y': 0
requirements:
- class: SubworkflowFeatureRequirement
class: Workflow
cwlVersion: v1.0
id: ion
label: ion
$namespaces:
sbg: 'https://www.sevenbridges.com/'
inputs:
- id: ion_3rd
type: boolean
'sbg:x': -1000
'sbg:y': 0
- id: refant
type: string?
'sbg:x': -1000
'sbg:y': 100
- id: h5parm
type: File
'sbg:x': -1000
'sbg:y': 200
- id: tables2export
type: string
'sbg:x': -1000
'sbg:y': 300
- id: inh5parm_logfile
type: 'File[]'
'sbg:x': -1000
'sbg:y': 400
- id: maxStddev
type: float
'sbg:x': -1000
'sbg:y': 500
- id: insolutions
type: File
'sbg:x': -1000
'sbg:y': 600
outputs:
- id: inspection
outputSource:
- losoto_plot_A1/output_plots
- losoto_plot_A2/output_plots
- losoto_plot_P3/output_plots
- losoto_plot_Pd/output_plots
- losoto_plot_tec/output_plots
- losoto_plot_tec3rd/output_plots
- losoto_plot_clock/output_plots
- losoto_plot_Pr/output_plots
- losoto_plot_Pr3/output_plots
type: 'File[]?'
linkMerge: merge_flattened
'sbg:x': 1000
'sbg:y': 0
- id: outsolutions
outputSource:
- write_solutions/outh5parm
type: File
'sbg:x': 1000
'sbg:y': 100
- id: logfiles
outputSource:
- concat_logfiles_ion/output
type: 'File[]'
linkMerge: merge_flattened
'sbg:x': 1000
'sbg:y': 200
steps:
- id: clocktec
in:
- id: input_h5parm
source: h5parm
- id: maxStddev
source: maxStddev
- id: fit3rdorder
source: ion_3rd
out:
- id: output_h5parm
- id: logfiles
run: ../../subworkflow/clocktec.cwl
label: clocktec
'sbg:x': -500
'sbg:y': 0
- id: losoto_plot_A1
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/amplitudeOrig000
- id: axesInPlot
default:
- time
- freq
- id: axisInTable
default: ant
- id: plotFlag
default: true
- id: prefix
default: ion_ampBFlag_
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_A1
'sbg:x': 0
'sbg:y': -400
- id: losoto_plot_A2
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/amplitude000
- id: axesInPlot
default:
- time
- freq
- id: axisInTable
default: ant
- id: plotFlag
default: true
- id: prefix
default: ion_ampAFlag_
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_A2
'sbg:x': 0
'sbg:y': -300
- id: losoto_plot_P3
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/phaseOrig
- id: axesInPlot
default:
- time
- freq
- id: axisInTable
default: ant
- id: minmax
default:
- -3.14
- 3.14
- id: plotFlag
default: true
- id: refAnt
source: refant
- id: prefix
default: ion_ph_
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_P3
'sbg:x': 0
'sbg:y': -200
- id: losoto_plot_Pd
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/phaseOrig
- id: axesInPlot
default:
- time
- freq
- id: axisInTable
default: ant
- id: axisDiff
default: pol
- id: minmax
default:
- -3.14
- 3.14
- id: plotFlag
default: true
- id: refAnt
source: refant
- id: prefix
default: ion_ph_poldif
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_Pd
'sbg:x': 0
'sbg:y': -100
- id: losoto_plot_tec
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/tec
- id: axesInPlot
default:
- time
- id: axisInTable
default: ant
- id: plotFlag
default: false
- id: refAnt
source: refant
- id: prefix
default: tec
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_tec
'sbg:x': 0
'sbg:y': 0
- id: losoto_plot_tec3rd
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
source:
- ion_3rd
valueFrom: '$(self ? "sol000/tec3rd" : sol000/tec)'
- id: axesInPlot
default:
- time
- id: axisInTable
default: ant
- id: plotFlag
default: false
- id: refAnt
source: refant
- id: prefix
source:
- ion_3rd
valueFrom: '$(self ? "tec3rd" : "tec")'
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_tec3rd
'sbg:x': 0
'sbg:y': 100
- id: losoto_plot_clock
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/clock
- id: axesInPlot
default:
- time
- id: axisInTable
default: ant
- id: plotFlag
default: false
- id: refAnt
source: refant
- id: prefix
default: clock
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_clock
'sbg:x': 0
'sbg:y': 200
- id: losoto_plot_Pr
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/phase000
- id: axesInPlot
default:
- time
- freq
- id: axisInTable
default: ant
- id: axisDiff
default: pol
- id: minmax
default:
- -3.14
- 3.14
- id: plotFlag
default: true
- id: refAnt
source: refant
- id: prefix
default: ion_ph-res_poldif
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_Pr
'sbg:x': 0
'sbg:y': 300
- id: losoto_plot_Pr3
in:
- id: input_h5parm
source: clocktec/output_h5parm
- id: soltab
default: sol000/phase000
- id: axesInPlot
default:
- time
- freq
- id: axisInTable
default: ant
- id: axisInCol
default: pol
- id: minmax
default:
- -3.14
- 3.14
- id: plotFlag
default: true
- id: refAnt
source: refant
- id: prefix
default: ion_ph-res_
out:
- id: output_plots
- id: logfile
- id: parset
run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
label: losoto_plot_Pr3
'sbg:x': 0
'sbg:y': 400
- id: concat_logfiles_ion
in:
- id: file_list
linkMerge: merge_flattened
source:
- inh5parm_logfile
- clocktec/logfiles
- losoto_plot_A1/logfile
- losoto_plot_A2/logfile
- losoto_plot_P3/logfile
- losoto_plot_Pd/logfile
- losoto_plot_tec/logfile
- losoto_plot_tec3rd/logfile
- losoto_plot_clock/logfile
- losoto_plot_Pr/logfile
- losoto_plot_Pr3/logfile
- write_solutions/log
- id: file_prefix
default: losoto_ion
out:
- id: output
run: ../../steps/concatenate_files.cwl
label: concat_logfiles_ion
'sbg:x': 500
'sbg:y': 500
- id: write_solutions
in:
- id: h5parmFile
source: clocktec/output_h5parm
- id: outsolset
default: calibrator
- id: insoltab
source: tables2export
- id: input_file
source: insolutions
- id: squeeze
default: true
- id: verbose
default: true
out:
- id: outh5parm
- id: log
run: ../../steps/h5parmcat.cwl
label: write_solutions
'sbg:x': -200
'sbg:y': 700
requirements:
- class: SubworkflowFeatureRequirement
- class: MultipleInputFeatureRequirement
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