forked from lmorabit/lofar-vlbi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplit-Directions.parset
executable file
·211 lines (176 loc) · 10.7 KB
/
Split-Directions.parset
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
##################################################################
## LOFAR long baseline calibration pipeline parset ##
## - This pipeline requires prefactor V3 ##
## to have already been run on both calibrator ##
## and target, and LB-Delay-Calibration on the target data ##
## - The working and runtime directory are expected ##
## to be the same. ##
## - Please report any issues at ##
## https://github.com/lmorabit/lofar-vlbi ##
##################################################################
##########################################################
## Software and directory paths ##
##########################################################
# software paths
! lofar_vlbi_dir = /home/morabito/software/lofar-vlbi
! prefactor_dir = /home/morabito/software/prefactor
! selfcal_dir = /home/morabito/software/lofar_facet_selfcal
! helper_dir = /home/morabito/software/lofar_helpers
# the following are in the singularity image and should not need to be changed
! losoto_directory = /opt/lofar/losoto
! aoflagger = /opt/lofar/aoflagger/bin/aoflagger
! lofar_directory = $LOFARROOT
## location of scripts
! scripts = {{ lofar_vlbi_dir }}/bin
! prefactor_scripts = {{ prefactor_dir }}/scripts
## directory information
! base_directory = input.output.working_directory
! job_directory = input.output.job_directory
! delaycal_directory = {{ job_directory }}/../Delay-Calibration
! results_directory = {{ job_directory }}/results
## Target selfcal config
! target_config_file = {{ lofar_vlbi_dir }}/targetselfcal_config.txt
##########################################################
## These parameters may need to be updated. ##
##########################################################
## catalogue information -- update if you want to use your own instead of the auto-generated one
! image_cat = {{ delaycal_directory }}/results/image_catalogue.csv
## format h5parm for setting time axis
! cal_solutions = {{ delaycal_directory }}/solutions.h5
## Runtime setup -- will depend on your computing cluster
! num_proc_per_node = input.output.max_per_node ## number of processes to use per step per node
! num_proc_per_node_limit = 4 ## number of processes to use per step per node for tasks with high i/o (dppp or cp) or memory (eg calibration)
! max_dppp_threads = 4 ## number of threads per process for NDPPP
! error_tolerance = False ## False = stop if any subband fails, True = keep going
##########################################################
## Changing these will probably break something. ##
##########################################################
## data column from Delay-Calibration
! data_col = DATA ## set to DATA_DI_CORRECTED if you applied ddf solutions in Delay-Calibration
## Averaging parameters
! cal_avg_freqresolution = 390.56kHz
! cal_avg_timeresolution = 32.
## Station combination
! phaseup_command = {ST001:'CS*'} ## 'CS*' for all core stations (or select stations you want to use) -- set to string '000' to not combine anything
! filter_command = '!CS*&&*' ## remove the core stations after combination
! rfistrategy = HBAdefault
##
## END CONFIGURATION
##########################################################
## Steps to run. ##
##########################################################
pipeline.steps = [ setup, selfcal ]
pipeline.steps.setup = [ mk_results_dir, targetdata_map, prep_dir, dppp_phaseup, dppp_phaseup_list, sort_phaseupmap, do_phaseup_maps, phaseup_concat ]
pipeline.steps.selfcal = [createmap_selfcal, selfcal ]
###########################################################################
##################################################################################################################
## ##
## BEGIN PIPELINE: DO NOT UPDATE BELOW THIS LINE! ##
## ##
##################################################################################################################
# create the results directory if needed
mk_results_dir.control.kind = plugin
mk_results_dir.control.type = makeDirectory
mk_results_dir.control.directory = {{ results_directory }}
# generate a mapfile of the delay-calibrated subbands
targetdata_map.control.kind = plugin
targetdata_map.control.type = createMapfile
targetdata_map.control.method = mapfile_from_folder
targetdata_map.control.mapfile_dir = input.output.mapfile_dir
targetdata_map.control.filename = targetdata_map.mapfile
targetdata_map.control.folder = {{ delaycal_directory }}
targetdata_map.control.pattern = L*msdpppconcat
# convert the best delay calibrator from catalogue to output mapfile
prep_dir.control.kind = plugin
prep_dir.control.type = TargetListToMapfile
prep_dir.control.mapfile_dir = input.output.mapfile_dir
prep_dir.control.mapfile_in = targetdata_map.output.mapfile
prep_dir.control.filename = prep_dir.mapfile
prep_dir.control.target_file = {{ image_cat }}
prep_dir.control.all_to_one = False
# shift, average and add up stations for tied array
dppp_phaseup.control.type = dppp
dppp_phaseup.control.max_per_node = {{ num_proc_per_node }}
dppp_phaseup.control.mapfile_out = prep_dir.output.mapfile
dppp_phaseup.argument.msin = targetdata_map.output.mapfile
dppp_phaseup.argument.msin.datacolumn = {{ data_col }}
dppp_phaseup.argument.msout.datacolumn = DATA
dppp_phaseup.argument.msout.storagemanager = dysco
dppp_phaseup.argument.msout.overwrite = True
dppp_phaseup.argument.steps = [shift, average1, applybeam, average2]
dppp_phaseup.argument.shift.type = phaseshift
dppp_phaseup.argument.shift.phasecenter = prep_dir.output.coords
dppp_phaseup.argument.average1.type = averager
dppp_phaseup.argument.average1.freqresolution = 48.82kHz
dppp_phaseup.argument.average1.timeresolution = 4.
dppp_phaseup.argument.applybeam.type = applybeam
dppp_phaseup.argument.applybeam.direction = prep_dir.output.coords
dppp_phaseup.argument.applybeam.beammode = full
dppp_phaseup.argument.average2.type = averager
dppp_phaseup.argument.average2.freqresolution = {{ cal_avg_freqresolution }}
dppp_phaseup.argument.average2.timeresolution = {{ cal_avg_timeresolution }}
dppp_phaseup.argument.numthreads = {{ max_dppp_threads }}
# convert to a mapfile with all bands in one list
dppp_phaseup_list.control.kind = plugin
dppp_phaseup_list.control.type = createMapfile
dppp_phaseup_list.control.method = mapfile_all_to_one
dppp_phaseup_list.control.mapfile_dir = input.output.mapfile_dir
dppp_phaseup_list.control.filename = dppp_phaseup_list.mapfile
dppp_phaseup_list.control.mapfile_in = dppp_phaseup.output.mapfile
# sort them by frequency and fill in missing subband information
sort_phaseupmap.control.type = pythonplugin
sort_phaseupmap.control.executable = {{ prefactor_scripts }}/sort_times_into_freqGroups.py
sort_phaseupmap.argument.flags = [dppp_phaseup_list.output.mapfile]
sort_phaseupmap.argument.filename = sort_phaseupmap
sort_phaseupmap.argument.mapfile_dir = input.output.mapfile_dir
sort_phaseupmap.argument.target_path = {{ job_directory }}
sort_phaseupmap.argument.numSB = -1
sort_phaseupmap.argument.NDPPPfill = True
sort_phaseupmap.argument.stepname = dpppconcat
sort_phaseupmap.argument.firstSB = None
sort_phaseupmap.argument.truncateLastSBs = False
# convert the output of sort_phaseupmap into usable mapfile
do_phaseup_maps.control.kind = plugin
do_phaseup_maps.control.type = mapfilenamesFromMapfiles
do_phaseup_maps.control.mapfile_groupmap = sort_phaseupmap.output.groupmapfile.mapfile
do_phaseup_maps.control.mapfile_datamap = sort_phaseupmap.output.mapfile.mapfile
# concatenate them
phaseup_concat.control.type = dppp
phaseup_concat.control.max_per_node = {{ num_proc_per_node_limit }}
phaseup_concat.control.error_tolerance = {{ error_tolerance }}
phaseup_concat.control.mapfiles_out = do_phaseup_maps.output.groupmap
phaseup_concat.control.mapfiles_in = [do_phaseup_maps.output.datamap]
phaseup_concat.control.inputkey = msin
phaseup_concat.argument.msin.datacolumn = DATA
phaseup_concat.argument.msin.missingdata = True
phaseup_concat.argument.msin.orderms = False
phaseup_concat.argument.msout.datacolumn = DATA
phaseup_concat.argument.msout.writefullresflag = False
phaseup_concat.argument.msout.storagemanager = dysco
phaseup_concat.argument.msout.overwrite = True
phaseup_concat.argument.steps = [count]
phaseup_concat.argument.numthreads = {{ max_dppp_threads }}
# generate mapfile of the output file
createmap_selfcal.control.kind = plugin
createmap_selfcal.control.type = createMapfile
createmap_selfcal.control.method = mapfile_from_folder
createmap_selfcal.control.mapfile_dir = input.output.mapfile_dir
createmap_selfcal.control.filename = createmap_selfcal.mapfile
createmap_selfcal.control.folder = {{ job_directory }}/../Delay-Calibration/delay_solve
createmap_selfcal.control.pattern = merged_addCS_selfcalcyle009_linear*.h5
# run self-calibration
selfcal.control.type = pythonplugin
selfcal.control.executable = {{ scripts }}/run_selfcal.py
selfcal.control.mapfile_in = phaseup_concat.output.mapfile
selfcal.control.inputkey = msin
selfcal.argument.flags = [msin]
selfcal.argument.helperscriptspath = {{ selfcal_dir }}
selfcal.argument.helperscriptspath-h5merge = {{ helper_dir }}
selfcal.argument.configfile = {{ target_config_file }}
selfcal.argument.destdir = {{ job_directory }}
selfcal.argument.delay_sols = createmap_selfcal.output.mapfile
##################################################################
# ##
# END OF PIPELINE ##
# ##
##################################################################