Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d75b705
Remove faceselfcal run from split-directions
tikk3r May 27, 2026
36e1e8d
Tweak docstring
tikk3r May 27, 2026
8bd762d
Remove do_selfcal parameter
tikk3r May 27, 2026
f707fe7
Update workflows/split-directions.cwl
tikk3r May 27, 2026
5cd1c0b
Don't pass config to split-directions in auto selection
tikk3r Feb 19, 2026
b56d515
Update auto delay calibration with automatic config generation
tikk3r Apr 1, 2026
a544864
Don't run selfcal in split-directions
tikk3r Apr 3, 2026
11783ef
Fix skymodel trigger and validation
tikk3r Apr 8, 2026
97b42b3
Remove commented code
tikk3r Apr 23, 2026
50f6d10
Return the skymodels that were generated instead of the input images
tikk3r Apr 23, 2026
05350e5
Improve output types per review
tikk3r Apr 24, 2026
fac3eef
Remove unused configfile input
tikk3r Apr 24, 2026
4ac363a
Remove remaining configfile options and simplify skymodel output further
tikk3r Apr 24, 2026
3472234
Add lofar-vlbi-plot as a dependency
tikk3r Apr 24, 2026
292a503
Return configs for each delay calibrator
tikk3r May 6, 2026
b7d04a1
Fix config output
tikk3r May 7, 2026
fe7a712
Make image_catalogue optional
tikk3r May 7, 2026
3784ae9
Correct input key for model generation
tikk3r May 7, 2026
ef7650f
Remove unnecessary step
tikk3r May 7, 2026
3b3f9d5
Tweak cores for PyBDSF in skynet
tikk3r May 11, 2026
66fb8d4
Revert "Tweak cores for PyBDSF in skynet"
tikk3r May 11, 2026
1fb8f83
Tweak doc and remove unnecessary input type (won't run on single sour…
tikk3r May 15, 2026
55aa540
Output the configs used in the delay cal
tikk3r May 22, 2026
0186709
Fix return of skymodels
tikk3r May 22, 2026
66979f9
Remove unneeded outputs
tikk3r May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies = [
"LINC @ git+https://git.astron.nl/RD/LINC",
"lofar_facet_selfcal @ git+https://github.com/rvweeren/lofar_facet_selfcal",
"lofar_helpers @ git+https://github.com/jurjen93/lofar_helpers",
"lofar-vlbi-plot",
"losoto",
"numpy",
"pandas",
Expand Down
3 changes: 0 additions & 3 deletions steps/delay_cal_model.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ inputs:
position: 2
prefix: --model-image
separate: true
valueFrom: $(self.basename)


- id: process_all
type: boolean?
default: false
Expand Down
5 changes: 5 additions & 0 deletions steps/lofar_vlbi_plot.cwl
Comment thread
lonbar marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ outputs:
doc: Delay Calibrator CSV
outputBinding:
glob: delay_calibrators.csv
- id: image_catalogue_pf
type: File
doc: Image catalogue CSV
outputBinding:
glob: image_catalogue.csv

arguments:
- --continue_no_lotss
Expand Down
29 changes: 17 additions & 12 deletions workflows/delay-calibration.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ inputs:
If not provided, lofar-vlbi-plot will be run to generate the CSV (requires internet access).

- id: image_catalogue
type: File
type: File?
doc: An image catalogue file in CSV format.

- id: Ateam_skymodel
Expand Down Expand Up @@ -71,10 +71,6 @@ inputs:
default: TGSSphase
doc: The name of the target solution table to use from the solset input.

- id: configfile
type: File
doc: Settings for the delay calibration in delay_solve.

- id: reference_stationSB
type: int?
default: 104
Expand Down Expand Up @@ -158,10 +154,11 @@ inputs:

- id: starting_skymodel
type:
- File?
- File[]?
doc: |
Optional starting model(s) in BBS-compatible text format used to kickstart the delay calibration. If given and `do_auto_delay_selection` is enabled, the number of skymodels must be equal to `select_best_n_delay_calibrators`. Additionally, they should be named in such a way that when sorted by name, the delay calibrator MSes and skymodels end up in the same order.
Optional starting model(s) in FITS format used to kickstart the delay calibration when automatic selection from multiple delay candidates is used.
If given and `do_auto_delay_selection` is enabled, the number of skymodels must be equal to `select_best_n_delay_calibrators`.
Additionally, they should be named in such a way that when sorted by name, the delay calibrator MSes and skymodels end up in the same order.

- id: do_auto_delay_selection
type: boolean?
Expand Down Expand Up @@ -206,6 +203,7 @@ steps:
source: delay_calibrator
out:
- id: delay_calibrator_pf
- id: image_catalogue_pf
run: ../steps/lofar_vlbi_plot.cwl
when: $(inputs.delay_calibrator == null)

Expand Down Expand Up @@ -320,14 +318,18 @@ steps:
linkMerge: merge_nested
pickValue: first_non_null
valueFrom: $(self)
- id: configfile
source: configfile
- id: delay_calibrator
source:
- delay_calibrator
- lofar_vlbi_plot/delay_calibrator_pf
pickValue: first_non_null
valueFrom: $(self)
- id: image_catalogue
source:
- image_catalogue
- lofar_vlbi_plot/image_catalogue_pf
pickValue: first_non_null
Comment thread
tikk3r marked this conversation as resolved.
valueFrom: $(self)
- id: select_best_n_delay_calibrators
source: select_best_n_delay_calibrators
- id: do_auto_delay_selection
Expand All @@ -345,6 +347,7 @@ steps:
- id: pictures
- id: phasediff_score_csv
- id: solutions
- id: configs
run: ./subworkflows/find-best-delay-calibrator.cwl
when: $(inputs.do_auto_delay_selection)

Expand Down Expand Up @@ -452,7 +455,10 @@ outputs:
- id: facetselfcal_config
outputSource:
- phaseup/facetselfcal_config
type: File
- select_best_delay_cal/configs
type:
- File
- File[]
pickValue: the_only_non_null
doc: Config file with settings used for the delay calibration.

Expand All @@ -461,8 +467,7 @@ outputs:
- phaseup/starting_skymodel
- select_best_delay_cal/starting_skymodels
type: File[]
pickValue: all_non_null
linkMerge: merge_flattened
pickValue: first_non_null
doc: |
The starting model(s) that were used to kick start the delay calibration.

Expand Down
46 changes: 1 addition & 45 deletions workflows/split-directions.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ doc: |
* Splits a LOFAR MeasurementSet into various target directions
* Applies delay calibrator solutions
* Optionally (for wide-field imaging) performs direction-dependent calibrator selection
* Optionally performs self-calibration on the target directions
This step should be run after the delay calibration workflow.
This workflow should be run on data processed by the delay calibration workflow if run manually, but is typically run automatically by dd-calibration.

requirements:
- class: SubworkflowFeatureRequirement
Expand All @@ -27,10 +26,6 @@ inputs:
type: File
doc: The image catalogue (in FITS or CSV format) containing the target directions.
default: lotss_catalogue.csv
- id: do_selfcal
type: boolean?
default: false
doc: Whether to do selfcal on the direction concat MSs.
- id: dd_selection
type: boolean?
default: false
Expand All @@ -49,10 +44,6 @@ inputs:
type: float
default: 0.0
doc: Peak flux (Jy/beam) cut to pre-select sources from catalogue. Default at 0.0 is no peak flux selection.
- id: configfile
type: File?
default: null
doc: The configuration file to be used to run facetselfcal.py during the target_selfcal step.
- id: frequency_resolution
type: string?
default: '390.56kHz'
Expand Down Expand Up @@ -144,48 +135,13 @@ steps:
when: $(inputs.dd_selection)
run: ./subworkflows/phasediff_selection.cwl

- id: target_selfcal
label: Target Selfcal
in:
- id: msin
source:
- phasediff_selection/best_ms
- flatten_msout/flattenedarray
pickValue: first_non_null
- id: configfile
source: configfile
- id: do_selfcal
source: do_selfcal
out:
- id: images
- id: h5parm
when: $(inputs.do_selfcal)
run: ../steps/facet_selfcal.cwl
scatter: msin

outputs:
- id: msout_concat
type: Directory[]
outputSource:
- phasediff_selection/best_ms
- flatten_msout/flattenedarray
pickValue: first_non_null
- id: images
type:
type: array
items:
type: array
items: File
outputSource:
- target_selfcal/images
pickValue: the_only_non_null
- id: phasediff_score_csv
type: File?
outputSource: phasediff_selection/phasediff_score_csv
- id: h5parm
type:
- File
- File[]
outputSource:
- target_selfcal/h5parm
pickValue: the_only_non_null
74 changes: 39 additions & 35 deletions workflows/subworkflows/find-best-delay-calibrator.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ inputs:
- id: delay_calibrator
type: File
doc: A delay calibrator catalogue in CSV format.
- id: configfile
- id: image_catalogue
type: File
doc: Settings for the delay calibration in delay_solve.
doc: A catalogue with other sources in the field (e.g. a LoTSS catalogue).
- id: starting_skymodel
type:
- File[]?
doc: |
Optional starting models in BBS-compatible text format used to kickstart the delay calibration. If given, the number of skymodels must be equal to `select_best_n_delay_calibrators`. Additionally, they should be named in such a way that when sorted by name, the delay calibrator MSes and skymodels end up in the same order.
Optional starting models in FITS format used to kickstart the delay calibration. If given, the number of skymodels must be equal to `select_best_n_delay_calibrators`. Additionally, they should be named in such a way that when sorted by name, the delay calibrator MSes and skymodels end up in the same order.
- id: select_best_n_delay_calibrators
type: int?
default: 1
Expand All @@ -43,52 +43,33 @@ inputs:
Time resolution to average the split off delay calibrators to.

steps:
- id: generate_skymodels
in:
- id: msin
source: msin
valueFrom: $(self[0])
- id: delay_calibrator
source: delay_calibrator
- id: process_all
default: true
out:
- id: skymodel
- id: logfile
run: ../../steps/delay_cal_model.cwl

- id: select_best_delay_cal
in:
- id: msin
source: msin
- id: dd_selection
default: true
- id: do_selfcal
default: true
default: false
- id: image_cat
source: delay_calibrator
- id: select_best_n
source: select_best_n_delay_calibrators
- id: configfile
source: configfile
Comment thread
tikk3r marked this conversation as resolved.
- id: frequency_resolution
source: frequency_resolution
- id: time_resolution
source: time_resolution
out:
- id: msout_concat
- id: images
- id: h5parm
- id: phasediff_score_csv
run: ../split-directions.cwl
label: select_best_delay_cal

- id: sort_skymodels
in:
- id: input_entry
source:
source:
- starting_skymodel
- generate_skymodels/skymodel
pickValue: all_non_null
linkMerge: merge_flattened
out:
Expand All @@ -108,26 +89,40 @@ steps:
in:
- id: msin
source: sort_ms/sorted_entries
- id: configfile
source: configfile
- id: skymodel
- id: delay_calibrator
source: delay_calibrator
- id: image_catalogue
source: image_catalogue
- id: model_image
source: sort_skymodels/sorted_entries
out:
- id: images
- id: h5parm
run: ../../steps/facet_selfcal.cwl
scatter: [msin, skymodel]
- id: solutions
- id: starting_skymodel
- id: config
- id: pictures
- id: logfile
run: ./delay_cal_run.cwl
scatter: [msin, model_image]
scatterMethod: dotproduct

- id: flatten_delay_images
in:
- id: nestedarray
source: delay_selfcal/images
source: delay_selfcal/pictures
out:
- id: flattenedarray
run: ../../steps/flatten.cwl
label: flatten_delay_images

- id: flatten_delay_models
in:
- id: nestedarray
source: delay_selfcal/starting_skymodel
out:
- id: flattenedarray
run: ../../steps/flatten.cwl
label: flatten_delay_models

outputs:
- id: msout
outputSource:
Expand All @@ -139,9 +134,10 @@ outputs:
format, phase-shifted to the delay calibrator.

- id: starting_skymodels
outputSource: generate_skymodels/skymodel
outputSource:
- flatten_delay_models/flattenedarray
type: File[]
doc: Starting models that were used to kickstart the delay calibration.
doc: Starting skymodels that were used to kickstart the delay calibration.

- id: pictures
outputSource:
Expand All @@ -151,6 +147,14 @@ outputs:
linkMerge: merge_flattened
doc: Inspection plots generated by lofar_facet_selfcal.

- id: configs
outputSource:
- delay_selfcal/config
type: File[]
pickValue: all_non_null
linkMerge: merge_flattened
doc: Facetselfcal config files used for the calibration.

- id: phasediff_score_csv
outputSource: select_best_delay_cal/phasediff_score_csv
type:
Expand All @@ -159,7 +163,7 @@ outputs:
A CSV file containing the phasediff scores for each of the calibrators that were split out.

- id: solutions
outputSource: delay_selfcal/h5parm
outputSource: delay_selfcal/solutions
type:
- File
- File[]
Expand Down
Loading