listobs("sis14_twhya_calibrated_flagged.ms") ### comparison with without selfcal ### ''' os.system('rm -rf image_noselfcal.*') tclean(vis='sis14_twhya_calibrated_flagged.ms', imagename='image_noselfcal', field='5', spw='', specmode='mfs', deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', niter=5000, interactive=False) ''' ### continuum selfcal without split### os.system('rm -rf im_p0.*') tclean(vis='sis14_twhya_calibrated_flagged.ms', imagename='im_p0', field='5', spw='', specmode='mfs', deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', niter=5000, interactive=True, savemodel='modelcolumn') os.system("rm -rf phase.cal") gaincal(vis="sis14_twhya_calibrated_flagged.ms", caltable="pcal1.cal", field="5", solint="30s", calmode="p", refant="DV22", gaintype="G") applycal(vis="sis14_twhya_calibrated_flagged.ms", field="5", gaintable=["pcal1.cal"], interp="linear") os.system('rm -rf im_p1.*') tclean(vis='sis14_twhya_calibrated_flagged.ms', imagename='im_p1', field='5', spw='', specmode='mfs', deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', interactive=True, niter=5000, savemodel='modelcolumn') os.system("rm -rf pcal2.cal") gaincal(vis='sis14_twhya_calibrated_flagged.ms', caltable="pcal2.cal", field="5", solint="30s", calmode="p", refant="DV22", gaintype="G") applycal(vis='sis14_twhya_calibrated_flagged.ms', field="5", gaintable=["pcal2.cal"], interp="linear") os.system('rm -rf im_p2.*') tclean(vis='sis14_twhya_calibrated_flagged.ms', imagename='im_p2', field='5', spw='', specmode='mfs', deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', interactive=True, niter=5000, savemodel='modelcolumn') os.system("rm -rf pcal3.cal") gaincal(vis='sis14_twhya_calibrated_flagged.ms', caltable="pcal3.cal", field="5", solint="30s", calmode="p", refant="DV22", gaintype="G") applycal(vis='sis14_twhya_calibrated_flagged.ms', field="5", gaintable=["pcal3.cal"], interp="linear") os.system('rm -rf im_p3.*') tclean(vis='sis14_twhya_calibrated_flagged.ms', imagename='im_p3', field='5', spw='', specmode='mfs', deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', interactive=True, niter=5000, savemodel='modelcolumn') os.system("rm -rf amp.cal") gaincal(vis='sis14_twhya_calibrated_flagged.ms', caltable="amp.cal", gaintable='pcal3.cal', ### different from the split-selfcal process field="5", solint="inf", calmode="ap", refant="DV22", gaintype="G", solnorm=True) applycal(vis='sis14_twhya_calibrated_flagged.ms', field="5", gaintable=['pcal3.cal', "amp.cal"], interp="linear") os.system('rm -rf im_ap.*') tclean(vis='sis14_twhya_calibrated_flagged.ms', imagename='im_ap', field='5', spw='', specmode='mfs', deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', interactive=False, niter=5000) contvis = 'sis14_twhya_calibrated_flagged.ms' split(vis=contvis,outputvis=contvis+'.selfcal', datacolumn='corrected') ### line imaging withouth selfcal ### vis = 'sis14_twhya_calibrated_flagged.ms' uvcontsub(vis=vis,fitspw='0:10~200;300~380', fitorder=0) restfreq = '372.67249300GHz' tclean(vis='sis14_twhya_calibrated_flagged.ms.contsub', imagename='n2hplus_noselfcal', field='5', spw='', # specmode='mfs', specmode='cube', start=230,width=1,nchan=20, outframe='lsrk',veltype='radio', restfreq=restfreq, deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', niter=5000, interactive=False) ### line imageing with continuum selfcal applied ### spwmap_line = [0] applycal(vis='sis14_twhya_calibrated_flagged.ms.contsub', spwmap=[spwmap_line, spwmap_line], # entering the appropriate spwmap_line value for each spw in the input dataset field='5', gaintable=['pcal3.cal','amp.cal'], interp=['linear', 'linear']) split(vis='sis14_twhya_calibrated_flagged.ms.contsub', outputvis='sis14_twhya_calibrated_flagged.ms.contsub.selcal', datacolumn='corrected') restfreq = '372.67249300GHz' tclean(vis='sis14_twhya_calibrated_flagged.ms.contsub.selcal', imagename='n2hplus_selfcal', field='5', spw='', # specmode='mfs', specmode='cube', start=230,width=1,nchan=20, outframe='lsrk',veltype='radio', restfreq=restfreq, deconvolver='hogbom', nterms=1, gridder='standard', imsize=[250,250], cell=['0.1arcsec'], weighting='natural', threshold='0mJy', niter=5000, interactive=False)