Source
1
-
<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/xmlcasa/xml/casa.xsd" xmlns="http://casa.nrao.edu/schema/psetTypes.html" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2
-
3
-
<task type="function" name="partition" category="manipulation">
4
-
<shortdescription>Task to produce Multi-MSs using parallelism</shortdescription>
5
-
6
-
<description>
7
-
Partition is a task to create a Multi-MS out of an MS. General selection
8
-
parameters are included, and one or all of the various data columns
9
-
(DATA, LAG_DATA and/or FLOAT_DATA, and possibly MODEL_DATA and/or
10
-
CORRECTED_DATA) can be selected.
11
-
12
-
The partition task creates a Multi-MS in parallel, using the CASA MPI framework.
13
-
The user should start CASA as follows in order to run it in parallel.
14
-
15
-
1) Start CASA on a single node with 8 engines. The first engine will be used as the
16
-
MPIClient, where the user will see the CASA prompt. All other engines will be used
17
-
as MPIServers and will process the data in parallel.
18
-
mpicasa -n 8 casa --nogui --log2term
19
-
partition(.....)
20
-
21
-
2) Running on a group of nodes in a cluster.
22
-
mpicasa -hostfile user_hostfile casa ....
23
-
partition(.....)
24
-
25
-
where user_hostfile contains the names of the nodes and the number of engines to use
26
-
in each one of them. Example:
27
-
pc001234a, slots=5
28
-
pc001234b, slots=4
29
-
30
-
If CASA is started without mpicasa, it is still possible to create an MMS, but
31
-
the processing will be done in sequential.
32
-
33
-
A multi-MS is structured to have a reference MS on the top directory and a
34
-
sub-directory called SUBMSS, which contain each partitioned sub-MS. The
35
-
reference MS contains links to the sub-tables of the first sub-MS. The other
36
-
sub-MSs contain a copy of the sub-tables each. A multi-MS looks like this in disk.
37
-
38
-
ls ngc5921.mms
39
-
ANTENNA FLAG_CMD POLARIZATION SPECTRAL_WINDOW table.dat
40
-
DATA_DESCRIPTION HISTORY PROCESSOR STATE table.info
41
-
FEED OBSERVATION SORTED_TABLE SUBMSS WEATHER
42
-
FIELD POINTING SOURCE SYSCAL
43
-
44
-
ls ngc5921.mms/SUBMSS/
45
-
ngc5921.0000.ms/ ngc5921.0002.ms/ ngc5921.0004.ms/ ngc5921.0006.ms/
46
-
ngc5921.0001.ms/ ngc5921.0003.ms/ ngc5921.0005.ms/
47
-
48
-
Inside casapy, one can use the task listpartition to list the information
49
-
from a multi-MS.
50
-
51
-
When partition processes an MMS in parallel, each sub-MS is processed independently in an engine.
52
-
The log messages of the engines are identified by the string MPIServer-#, where # gives the number
53
-
of the engine running that process. When the task runs sequentially, it shows the MPIClient text
54
-
in the origin of the log messages or does not show anything.
55
-
56
-
</description>
57
-
58
-
<input>
59
-
<param type="path" name="vis" mustexist="true"><shortdescription>Name of input measurement set</shortdescription><description>Name of input measurement set</description>
60
-
61
-
<value/>
62
-
</param>
63
-
64
-
<param type="string" name="outputvis"><shortdescription>Name of output measurement set</shortdescription><description>Name of output measurement set</description>
65
-
66
-
<value/>
67
-
</param>
68
-
<param type="bool" name="createmms"><shortdescription>Should this create a multi-MS output</shortdescription><description>Should this create a multi-MS output</description>
69
-
70
-
<value>True</value>
71
-
</param>
72
-
<param type="string" name="separationaxis" ignorecase="true" subparam="true"><shortdescription>Axis to do parallelization across(scan, spw, baseline, auto)</shortdescription><description>Axis to do parallelization across(scan, spw, baseline, auto)</description>
73
-
74
-
<value>auto</value>
75
-
<allowed kind="enum" ignorecase="true">
76
-
<value>auto</value>
77
-
<value>scan</value>
78
-
<value>spw</value>
79
-
<value>baseline</value>
80
-
</allowed>
81
-
</param>
82
-
<param type="any" name="numsubms" subparam="true"><shortdescription>The number of SubMSs to create (auto or any number)</shortdescription><description>The number of SubMSs to create (auto or any number)</description>
83
-
84
-
<type>string</type><type>int</type>
85
-
<value type="string">auto</value>
86
-
</param>
87
-
<param type="bool" name="flagbackup" subparam="true"><shortdescription>Create a backup of the FLAG column in the MMS.</shortdescription><description>Create a backup of the FLAG column in the MMS.</description>
88
-
89
-
<value>True</value>
90
-
</param>
91
-
92
-
<param type="string" name="datacolumn" ignorecase="True"><shortdescription>Which data column(s) to process.</shortdescription><description>Which data column(s) to process.</description>
93
-
94
-
<value>all</value>
95
-
<allowed kind="enum" ignorecase="True">
96
-
<value>all</value>
97
-
<value>data</value>
98
-
<value>corrected</value>
99
-
<value>model</value>
100
-
<value>data,model,corrected</value>
101
-
<value>float_data</value>
102
-
<value>lag_data</value>
103
-
<value>float_data,data</value>
104
-
<value>lag_data,data</value>
105
-
</allowed>
106
-
</param>
107
-
108
-
109
-
<param type="any" name="field"><shortdescription>Select field using ID(s) or name(s).</shortdescription><description>Select field using ID(s) or name(s).</description>
110
-
111
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
112
-
<value type="string"/>
113
-
</param>
114
-
115
-
<param type="any" name="spw"><shortdescription>Select spectral window/channels.</shortdescription><description>Select spectral window/channels.</description>
116
-
117
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
118
-
<value type="string"/>
119
-
</param>
120
-
121
-
<param type="any" name="scan"><shortdescription>Select data by scan numbers.</shortdescription><description>Select data by scan numbers.</description>
122
-
123
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
124
-
<value type="string"/>
125
-
</param>
126
-
127
-
<param type="any" name="antenna"><shortdescription>Select data based on antenna/baseline.</shortdescription><description>Select data based on antenna/baseline.</description>
128
-
129
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
130
-
<value type="string"/>
131
-
</param>
132
-
133
-
<param type="any" name="correlation"><shortdescription>Correlation: '' ==> all, correlation="XX,YY".</shortdescription><description>Correlation: '' ==> all, correlation="XX,YY".</description>
134
-
135
-
<type>string</type><type>stringVec</type>
136
-
<value type="string"/>
137
-
</param>
138
-
139
-
<param type="any" name="timerange"><shortdescription>Select data by time range.</shortdescription><description>Select data by time range.</description>
140
-
141
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
142
-
<value type="string"/>
143
-
</param>
144
-
145
-
<param type="any" name="intent"><shortdescription>Select data by scan intent.</shortdescription><description>Select data by scan intent.</description>
146
-
147
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
148
-
<value type="string"/>
149
-
</param>
150
-
151
-
<param type="any" name="array"><shortdescription>Select (sub)array(s) by array ID number.</shortdescription><description>Select (sub)array(s) by array ID number.</description>
152
-
153
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
154
-
<value type="string"/>
155
-
</param>
156
-
157
-
<param type="any" name="uvrange"><shortdescription>Select data by baseline length.</shortdescription><description>Select data by baseline length.</description>
158
-
159
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
160
-
<value type="string"/>
161
-
</param>
162
-
163
-
<param type="any" name="observation"><shortdescription>Select by observation ID(s).</shortdescription><description>Select by observation ID(s).</description>
164
-
165
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
166
-
<value type="string"/>
167
-
</param>
168
-
169
-
<param type="any" name="feed"><shortdescription>Multi-feed numbers: Not yet implemented.</shortdescription><description>Multi-feed numbers: Not yet implemented.</description>
170
-
171
-
<type>string</type><type>stringVec</type><type>int</type><type>intVec</type>
172
-
<value type="string"/>
173
-
</param>
174
-
175
-
176
-
<param type="bool" name="disableparallel" subparam="true" visibility="hidden"><shortdescription>Create a multi-MS in parallel.</shortdescription><description>Create a multi-MS in parallel.</description>
177
-
178
-
<value>False</value>
179
-
</param>
180
-
<param type="int" name="ddistart" subparam="true" visibility="hidden"><shortdescription>Do not change this parameter. For internal use only.</shortdescription><description>Do not change this parameter. For internal use only.</description>
181
-
182
-
<value>-1</value>
183
-
</param>
184
-
<param type="string" name="taql" subparam="true" visibility="hidden"><shortdescription>Table query for nested selections</shortdescription><description>Table query for nested selections</description>
185
-
186
-
<value type="string"/>
187
-
</param>
188
-
189
-
<constraints>
190
-
<when param="createmms">
191
-
<equals type="bool" value="True">
192
-
<default param="separationaxis"><value type="string">auto</value></default>
193
-
<default param="numsubms"><value type="string">auto</value></default>
194
-
<default param="flagbackup"><value type="bool">True</value></default>
195
-
196
-
<default param="disableparallel"><value type="bool">False</value></default>
197
-
<default param="ddistart"><value type="int">-1</value></default>
198
-
<default param="taql"><value type="string"/></default>
199
-
</equals>
200
-
201
-
<equals type="bool" value="False">
202
-
<default param="separationaxis"><value type="string">auto</value></default>
203
-
<default param="numsubms"><value type="string">auto</value></default>
204
-
<default param="flagbackup"><value type="bool">True</value></default>
205
-
206
-
<default param="disableparallel"><value type="bool">False</value></default>
207
-
<default param="ddistart"><value type="int">-1</value></default>
208
-
<default param="taql"><value type="string"/></default>
209
-
</equals>
210
-
</when>
211
-
212
-
</constraints>
213
-
214
-
</input>
215
-
216
-
<example>
217
-
218
-
219
-
----- Detailed description of keyword arguments -----
220
-
221
-
vis -- Name of input visibility file
222
-
default: none; example: vis='ngc5921.ms'
223
-
224
-
outputvis -- Name of output visibility file
225
-
default: none; example: outputvis='ngc5921.mms'
226
-
227
-
createmms -- Create a multi-MS as the output.
228
-
default: True
229
-
If False, it will work like the split task and create a
230
-
normal MS, split according to the given data selection parameters.
231
-
Note that, when this parameter is set to False, a cluster
232
-
will not be used.
233
-
234
-
separationaxis -- Axis to do parallelization across.
235
-
default: 'auto'
236
-
Options: 'scan', 'spw', 'baseline', 'auto'
237
-
238
-
- The 'auto' option will partition per scan/spw to obtain optimal load balancing with the
239
-
following criteria:
240
-
241
-
1. Maximize the scan/spw/field distribution across sub-MSs
242
-
2. Generate sub-MSs with similar size
243
-
244
-
- The 'scan' or 'spw' axes will partition the MS into scan or spw. The individual sub-MSs may
245
-
not be balanced with respect to the number of rows.
246
-
247
-
- The 'baseline' axis is mostly useful for Single-Dish data. This axis will partition the MS
248
-
based on the available baselines. If the user wants only auto-correlations, use the
249
-
antenna selection such as antenna='\*&&&' together with this separation axis. Note that in
250
-
if numsubms='auto', partition will try to create as many subMSs as the number of available
251
-
servers in the cluster. If the user wants to have one subMS for each baseline, set the numsubms
252
-
parameter to a number higher than the number of baselines to achieve this.
253
-
254
-
numsubms -- The number of sub-MSs to create.
255
-
default: 'auto'
256
-
Options: any integer number (example: numsubms=4)
257
-
258
-
The default 'auto' is to partition using the number of available servers in the cluster.
259
-
If the task is unable to determine the number of running servers, or the user did not start CASA
260
-
using mpicasa, numsubms will use 8 as the default.
261
-
262
-
Example: Launch CASA with 5 engines, where 4 of them will be used to create the MMS. The first
263
-
engine is used as the MPIClient.
264
-
265
-
mpicasa -n 5 casa --nogui --log2term
266
-
CASA> partition('uid__A1', outputvis='test.mms')
267
-
268
-
flagbackup -- Make a backup of the FLAG column of the output MMS. When the
269
-
MMS is created, the .flagversions of the input MS are not transferred,
270
-
therefore it is necessary to re-create it for the new MMS. Note
271
-
that multiple backups from the input MS will not be preserved. This
272
-
will create a single backup of all the flags present in the input
273
-
MS at the time the MMS is created.
274
-
default: True
275
-
276
-
datacolumn -- Which data column to use when partitioning the MS.
277
-
default='all'; example: datacolumn='data'
278
-
Options: 'data', 'model', 'corrected', 'all',
279
-
'float_data', 'lag_data', 'float_data,data', and
280
-
'lag_data,data'.
281
-
N.B.: 'all' = whichever of the above that are present.
282
-
283
-
---- Data selection parameters (see help par.selectdata for more detailed
284
-
information)
285
-
286
-
field -- Select field using field id(s) or field name(s).
287
-
[run listobs to obtain the list iof d's or names]
288
-
default: ''=all fields If field string is a non-negative
289
-
integer, it is assumed to be a field index
290
-
otherwise, it is assumed to be a field name
291
-
field='0~2'; field ids 0,1,2
292
-
field='0,4,5~7'; field ids 0,4,5,6,7
293
-
field='3C286,3C295'; fields named 3C286 and 3C295
294
-
field = '3,4C\*'; field id 3, all names starting with 4C
295
-
296
-
spw -- Select spectral window/channels
297
-
default: ''=all spectral windows and channels
298
-
spw='0~2,4'; spectral windows 0,1,2,4 (all channels)
299
-
spw='<2'; spectral windows less than 2 (i.e. 0,1)
300
-
spw='0:5~61'; spw 0, channels 5 to 61
301
-
spw='0,10,3:3~45'; spw 0,10 all channels, spw 3 - chans 3 to 45.
302
-
spw='0~2:2~6'; spw 0,1,2 with channels 2 through 6 in each.
303
-
spw = '\*:3~64' channels 3 through 64 for all sp id's
304
-
spw = ' :3~64' will NOT work.
305
-
spw = '\*:0;60~63' channel 0 and channels 60 to 63 for all IFs
306
-
';' needed to separate different channel ranges in one spw
307
-
spw='0:0~10;15~60'; spectral window 0 with channels 0-10,15-60
308
-
spw='0:0~10,1:20~30,2:1;2;4'; spw 0, channels 0-10,
309
-
spw 1, channels 20-30, and spw 2, channels, 1, 2 and 4
310
-
311
-
antenna -- Select data based on antenna/baseline
312
-
default: '' (all)
313
-
Non-negative integers are assumed to be antenna indices, and
314
-
anything else is taken as an antenna name.
315
-
316
-
Examples:
317
-
antenna='5&6': baseline between antenna index 5 and index 6.
318
-
antenna='VA05&VA06': baseline between VLA antenna 5 and 6.
319
-
antenna='5&6;7&8': baselines 5-6 and 7-8
320
-
antenna='5': all baselines with antenna 5
321
-
antenna='5,6,10': all baselines including antennas 5, 6, or 10
322
-
antenna='5,6,10&': all baselines with *only* antennas 5, 6, or
323
-
10. (cross-correlations only. Use &&
324
-
to include autocorrelations, and &&&
325
-
to get only autocorrelations.)
326
-
antenna='!ea03,ea12,ea17': all baselines except those that
327
-
include EVLA antennas ea03, ea12, or
328
-
ea17.
329
-
330
-
timerange -- Select data based on time range:
331
-
default = '' (all); examples,
332
-
timerange = 'YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss'
333
-
Note: if YYYY/MM/DD is missing date, timerange defaults to the
334
-
first day in the dataset
335
-
timerange='09:14:0~09:54:0' picks 40 min on first day
336
-
timerange='25:00:00~27:30:00' picks 1 hr to 3 hr 30min
337
-
on next day
338
-
timerange='09:44:00' data within one integration of time
339
-
timerange='>10:24:00' data after this time
340
-
341
-
array -- (Sub)array number range
342
-
default: ''=all
343
-
344
-
uvrange -- Select data within uvrange (default units meters)
345
-
default: ''=all; example:
346
-
uvrange='0~1000klambda'; uvrange from 0-1000 kilo-lambda
347
-
uvrange='>4klambda';uvranges greater than 4 kilo-lambda
348
-
uvrange='0~1000km'; uvrange in kilometers
349
-
350
-
scan -- Scan number range
351
-
default: ''=all
352
-
353
-
observation -- Select by observation ID(s)
354
-
default: ''=all
355
-
356
-
357
-
------ EXAMPLES ------
358
-
359
-
1) Create a Multi-MS of some spws, partitioned per spw. The MS contains 16 spws.
360
-
partition('uid001.ms', outpuvis='source.mms', spw='1,3~10', separationaxis='spw')
361
-
362
-
2) Create a Multi-MS but select only the first channels of all spws. Do not back up the FLAG
363
-
column.
364
-
partition('uid0001.ms', outputvis='fechans.mms', spw='\*:1~10', flagbackup=False)
365
-
366
-
3) Create a Multi-MS using both separation axes.
367
-
partition('uid0001.ms', outputvis='myuid.mms', createmms=True, separationaxis='auto')
368
-
369
-
4) Create a single-dish Multi-MS using the baseline axis only for the auto-correlations.
370
-
partition('uid0001.ms', outputvis='myuid.mms', createmms=True, separationaxis='baseline', antenna='\*&&&')
371
-
372
-
373
-
</example>
374
-
<returns>void</returns></task>
375
-
</casaxml>