Skip to content
Snippets Groups Projects

Merged delay_solve and target_solve.

Merged Matthijs van der Wild requested to merge merge_selfcal_steps into master
All threads resolved!
Files
5
cwlVersion: v1.2
class: CommandLineTool
id: delay_solve
label: Delay solve
id: facet_selfcal
label: Facet Selfcal
doc: |
Performs direction independent calibration
of the international antenna array.
baseCommand:
- python3
- delay_solve.py
- run_selfcal.py
inputs:
- id: msin
@@ -18,7 +18,7 @@ inputs:
delay calibrator in MeasurementSet format.
- id: skymodel
type: File
type: File?
doc: |
The skymodel to be used in the first
cycle in the self-calibration.
@@ -47,14 +47,19 @@ outputs:
- id: images
type: File[]
outputBinding:
glob: image*.png
glob: ['*.png', plotlosoto*/*.png]
doc: |
Delay calibrator images generated by lofar_facet_selfcal.
- id: fits_images
type: File[]
outputBinding:
glob: '*MFS-image.fits'
- id: logfile
type: File[]
outputBinding:
glob: delay_solve*.log
glob: [facet_selfcal*.log, selfcal.log]
doc: |
The files containing the stdout
and stderr from the step.
@@ -66,25 +71,30 @@ requirements:
listing:
- entry: $(inputs.configfile)
- entry: $(inputs.msin)
- entryname: delay_solve.py
- entryname: run_selfcal.py
entry: |
import subprocess
import sys
import json
inputs = json.loads(r"""$(inputs)""")
msin = inputs['msin']['basename']
configfile = inputs['configfile']['path']
skymodel = inputs['skymodel']['path']
skymodel = inputs['skymodel']['path'] if inputs['skymodel'] else None
selfcal = inputs['selfcal']['path']
h5merge = inputs['h5merger']['path']
subprocess.run(f'python3 {selfcal}/facetselfcal.py {msin} --helperscriptspath {selfcal} --helperscriptspathh5merge {h5merge} --skymodel {skymodel}', shell = True)
run_selfcal = (f"python3 {selfcal}/facetselfcal.py {msin}"
f" --helperscriptspath {selfcal}"
f" --helperscriptspathh5merge {h5merge}")
if skymodel:
run_selfcal += f" --skymodel {skymodel}"
subprocess.run(run_selfcal, shell = True)
hints:
- class: DockerRequirement
dockerPull: vlbi-cwl
stdout: delay_solve.log
stderr: delay_solve_err.log
stdout: facet_selfcal.log
stderr: facet_selfcal_err.log
Loading