forked from tammojan/facet-calibration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_allbands.py
62 lines (40 loc) · 1.12 KB
/
ft_allbands.py
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
import os
import sys
import numpy
import time
#casapy --nologger -c ft_allbands.py ms1 modimage nterms imsize
execfile('mytasks.py')
el=len(sys.argv)
print sys.argv[:]
mslist = sys.argv[4:el-3]
modimage = sys.argv[el-3]
ntermsi = numpy.int(sys.argv[el-2])
imsizep = numpy.int(sys.argv[el-1])
wplanes = 1
if imsizep > 512:
wplanes = 64
if imsizep > 799:
wplanes = 96
if imsizep > 1023:
wplanes = 128
if imsizep > 1599:
wplanes = 256
if imsizep > 2047:
wplanes = 384
if imsizep > 3000:
wplanes = 448
if imsizep > 4095:
wplanes = 512
if ntermsi == 1:
mod = [modimage]
if ntermsi == 2:
mod = [modimage+'.tt0',modimage+'.tt1']
if ntermsi == 3:
mod = [modimage+'.tt0',modimage+'.tt1',modimage+'.tt2']
for ms_id,ms in enumerate(mslist):
if wplanes > 1:
ftw(vis=ms,field="",spw="",model=mod,nterms=ntermsi,reffreq="",\
wprojplanes=wplanes,complist="",incremental=False,usescratch=True, async=False)
else:
ft(vis=ms,field="",spw="",model=mod,nterms=ntermsi,reffreq="",\
complist="",incremental=False,usescratch=True, async=False)