def scloop(): #for i in range(S.i,S.N+1): #print "Selfcal Loop "+str(i); #S.update(selfcal_options='mfs,amplitude'); #S.save(); clean(S) clean_deeper(S) sc(S) S.model = S.m4s S.image = S.m4s.replace('.m4s', '.image4s') S.res = S.m4s.replace('.m4s', '.res4s') calib.restorim(S, 'restor.txt') calib.restores(S, 'restor.txt')
def scloop(): #for i in range(S.i,S.N+1): #print "Selfcal Loop "+str(i); #S.update(selfcal_options='mfs,amplitude'); #S.save(); clean(S); clean_deeper(S); sc(S); S.model = S.m4s; S.image = S.m4s.replace('.m4s', '.image4s'); S.res = S.m4s.replace('.m4s', '.res4s'); calib.restorim(S, 'restor.txt'); calib.restores(S, 'restor.txt');
def scloop(): for i in range(S.i,S.i+S.N+1): print "Selfcal Loop "+str(i); S.update(selfcal_options='mfs,amplitude'); S.save(); gocal(S); decal(S); sc(S); S.model = S.m4s; S.image = S.m4s.replace('.m', '.image'); S.res = S.m4s.replace('.m', '.res'); calib.restorim(S, 'restor.txt'); calib.restores(S, 'restor.txt'); cmd = "grep Ratio selfcal.txt > sc_summary.txt"; os.system(cmd); X = pl.recfromtxt('sc_summary.txt', delimiter=':'); pl.figure(figsize=(5,5)); pl.plot(pl.log10(X['f1'])) pl.savefig('sc_summary.png', dpi=300) pl.close();
def rimres(): calib.restorim(S, 'restor.txt') calib.restores(S, 'restor.txt')
def clean(): #S.niters=10000; calib.invert(S, 'invert.txt') calib.clean(S, 'clean.txt') calib.restorim(S, 'restor.txt') calib.restores(S, 'restor.txt')
def gocal(S): calib.invert(S, 'invert.txt'); calib.clean(S, 'clean.txt'); calib.restorim(S, 'restor.txt'); calib.restores(S, 'restor.txt');
def rimres(): calib.restorim(S, 'restor.txt'); calib.restores(S, 'restor.txt');
def clean(): S.niters=10000; calib.invert(S, 'invert.txt'); calib.clean(S, 'clean.txt'); calib.restorim(S, 'restor.txt'); calib.restores(S, 'restor.txt');