Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 import os
00034 import time
00035 import regression_utility as tstutl
00036 from __main__ import default
00037 from tasks import *
00038 from taskinit import *
00039
00040
00041 benchmarking = True
00042 usedasync = False
00043
00044
00045 testdir='nf_regression/'
00046 prefix='narrowfield'
00047
00048
00049 msfile = 'model7.ms'
00050 modelfile = 'model2.txt'
00051 mask0 = 'M7_0.mask'
00052 mask1 = 'M7_1.mask'
00053 doubleI = 'Double_I.ext'
00054 doubleU = 'Double_U.ext'
00055
00056
00057
00058 tstutl.maketestdir(testdir)
00059
00060
00061 if benchmarking:
00062 startTime = time.time()
00063 startProc = time.clock()
00064
00065
00066
00067
00068 print '--Clean--'
00069
00070 taskname = 'clean'
00071 default(taskname)
00072 vis = msfile
00073 imagename = testdir+'MG_IQUV'
00074 outlierfile = modelfile
00075 niter = 2000
00076 threshold = '0.8mJy'
00077 mask = [[mask0],[mask1]]
00078 cell = '0.2arcsec'
00079 weighting = 'briggs'
00080 imagermode = 'csclean'
00081 restoringbeam = ['0.65','0.65','0.0deg']
00082 stokes = 'IQUV'
00083 clean()
00084
00085
00086
00087
00088
00089 print '--Immath--'
00090
00091
00092
00093 taskname = 'immath'
00094 default(taskname)
00095 imagename = testdir+'MG_IQUV_0.image'
00096 expr = 'IM0'
00097 stokes = 'I'; outfile = testdir+'MG_I_0.im'; immath()
00098 stokes = 'Q'; outfile = testdir+'MG_Q_0.im'; immath()
00099 stokes = 'U'; outfile = testdir+'MG_U_0.im'; immath()
00100 stokes = 'V'; outfile = testdir+'MG_V_0.im'; immath()
00101 imagename = testdir+'MG_IQUV_1.image'
00102 expr = 'IM0'
00103 stokes = 'I'; outfile = testdir+'MG_I_1.im'; immath()
00104 stokes = 'Q'; outfile = testdir+'MG_Q_1.im'; immath()
00105 stokes = 'U'; outfile = testdir+'MG_U_1.im'; immath()
00106 stokes = 'V'; outfile = testdir+'MG_V_1.im'; immath()
00107
00108
00109
00110
00111
00112
00113
00114 print '--Point sources--'
00115 print '--Imfit I--'
00116 taskname = 'imfit'
00117 default (taskname)
00118 box = '63,54,74,64'
00119 append = F
00120 stokes='I'
00121 imagename = testdir+'MG_I_1.im'
00122 logfile = testdir+'MG_I_1.log'
00123 newestimates = testdir+'MG_I_1.est'
00124 imfit()
00125
00126
00127
00128
00129 print '--Imfit Q--'
00130 imagename = testdir+'MG_Q_1.im'
00131 logfile = testdir+'MG_Q_1.log'
00132 stokes='Q'
00133 imfit()
00134
00135
00136
00137
00138 print '--Imfit U--'
00139 imagename = testdir+'MG_U_1.im'
00140 logfile = testdir+'MG_U_1.log'
00141 stokes='U'
00142 imfit()
00143
00144
00145
00146
00147 print '--Imfit V--'
00148 imagename = testdir+'MG_V_1.im'
00149 logfile = testdir+'MG_V_1.log'
00150 stokes='V'
00151 imfit()
00152
00153
00154
00155 print '--Extended source--'
00156 print '--Imfit I--'
00157
00158 taskname = 'imfit'
00159 default (taskname)
00160 box = '231,367,252,391'
00161 apend = F
00162 stokes='I'
00163 imagename = testdir+'MG_I_0.im'
00164 logfile = testdir+'MG_I_0.log'
00165 imfit()
00166
00167
00168
00169
00170 print '--Imfit Q--'
00171 imagename = testdir+'MG_Q_0.im'
00172 logfile = testdir+'MG_Q_0.log'
00173 stokes='Q'
00174 imfit()
00175
00176
00177
00178
00179 print '--Imfit U--'
00180 imagename = testdir+'MG_U_0.im'
00181 logfile = testdir+'MG_U_0.log'
00182 stokes='U'
00183 imfit()
00184
00185
00186
00187 print '--Point double source--'
00188 print '--Imfit I--'
00189
00190 taskname = 'imfit'
00191 default (taskname)
00192 box = '203,657,221,671'
00193 append = F
00194 stokes='I'
00195 imagename = testdir+'MG_I_0.im'
00196 logfile = testdir+'Double_I_0.log'
00197 estimates = doubleI
00198 imfit()
00199
00200
00201
00202 print '--Imfit U--'
00203 imagename = testdir+'MG_U_0.im'
00204 logfile = testdir+'Double_U_0.log'
00205 estimates = doubleU
00206 stokes='U'
00207 imfit()
00208
00209