# This script describes the continuum and line imaging for the # ALMA LBC SV B3 data for Mira. # Requires CASA 4.2.2 or higher. ########################################################################## # NOTES: # - This script has interactive parts, and is not meant to be executable. # - Observed lines # - SiO v=0 at 86.84696GHz # - SiO v=1 at 86.24337GHz # - SiO v=2 at 85.64045GHz # - 29SiO v=0 at 85.75919GHz # - Mira has a large proper motion, so between different observations the # RA and Dec coordinates of Mira changed (0.2mas in RA and 5.2mas in Dec, # in about a week timescale). We concatenate the datasets with these small # offsets (much smaller than the synthesized beam) including a "direction # tolerance" of 1 arcsecond, to include all of the Mira observations in the # same ms file and with the same field name. ########################################################################## # If working from the individual datasets # Concatenate datasets: band4_calibrated_data = ['uid___A002_X905825_X5a8.ms.split.cal.science', 'uid___A002_X916b15_X5c0.ms.split.cal.science', 'uid___A002_X916b15_X926.ms.split.cal.science'] os.system('rm -rf Mira_Band3.ms') concat(vis = band4_calibrated_data, concatvis = 'Mira_Band3.ms',dirtol='1arcsec') # The output file 'Mira_Band3.ms' will be the data product containing all spws # Split continuum data products os.system('rm -rf Mira_Band3_continuum.ms') split(vis='Mira_Band3.ms',outputvis='Mira_Band3_continuum.ms', spw=spw_cont,datacolumn='data') ################################################################### ################################################################### # THESE TWO MS FILES ARE CONTAINED IN THE SCIENCE PORTAL (SP) DATA # PRODUCT CALLED "CalibratedData". If you have downloaded these # products, start below this section for imaging. ################################################################### ################################################################### listobs('Mira_Band3.ms') listobs('Mira_Band3_continuum.ms') !du -hs Mira_Band3_continuum.ms # Split continuum data to use in selfcalibration: os.system('rm -rf Mira_Band3_cont_selfcal.ms') split(vis='Mira_Band3.ms',outputvis='Mira_Band3_cont_selfcal.ms', spw=spw_cont,datacolumn='data') listobs('Mira_Band3_cont_selfcal.ms') !du -hs Mira_Band3_cont_selfcal.ms # Define spectral windows for the continuum and line emission spw_cont = '0~2,7~9,14~16' spw_line_1 = '3,10,17' # SiO v=0 spw_line_2 = '4,11,18' # SiO v=1 spw_line_3 = '5,12,19' # SiO v=2 spw_line_4 = '6,13,20' # 29SiO v=0 # Split line data to use in selfcalibration: split(vis='Mira_Band3.ms',outputvis='Mira_Band3_SiOv_0.ms', spw=spw_line_1,datacolumn='data') split(vis='Mira_Band3.ms',outputvis='Mira_Band3_SiOv_1.ms', spw=spw_line_2,datacolumn='data') split(vis='Mira_Band3.ms',outputvis='Mira_Band3_SiOv_2.ms', spw=spw_line_3,datacolumn='data') split(vis='Mira_Band3.ms',outputvis='Mira_Band3_29SiOv_0.ms', spw=spw_line_4,datacolumn='data') # Initial continuum image without any selfcalibration (for reference): os.system('rm -rf Mira.contn2_noselfcal.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2_noselfcal', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='', weighting='briggs',robust=0.0, niter=250,npercycle=10,threshold='') viewer('Mira.contn2_noselfcal.image.tt0') # RMS = 0.03 mJy/beam # MiraA peak SNR = 840 # ------------------------------------------- # Self-calibration on the continuum emission # ------------------------------------------- # The continuum data is imaged using briggs/robust weighting, nterms=2, # and a mask selected during interactive mode. # Round #1 of selfcalibration: # (1) Make mask over Mira-A component first, then mask the Mira companion # after a few iterations, when the second component has better constrast. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 40 iterations (in steps of 10 iterations) os.system('rm -rf Mira.contn2.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='', weighting='briggs',robust=0.0, niter=40,npercycle=10,threshold='') # Do first round of self-calibration with averaging over the entire scan os.system('rm -rf pcal1_cont') gaincal(vis='Mira_Band3_cont_selfcal.ms',caltable='pcal1_cont',gaintype='T', refant='DV09',calmode='p',combine='', solint='inf',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal1_cont',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, so they are applied: applycal(vis='Mira_Band3_cont_selfcal.ms',spwmap=[],spw='',field='', gaintable=['pcal1_cont'],gainfield='',calwt=F,flagbackup=F) # Round #2 of selfcalibration: # (1) Use previous mask over Mira and its companion, but enlarge if needed. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 50 iterations (in steps of 10 iterations) os.system('rm -rf Mira.contn2_p1.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2_p1', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.contn2.mask', weighting='briggs',robust=0.0, niter=50,npercycle=10,threshold='') # Do second round of self-calibration averaging over 1min timescale os.system('rm -rf pcal2_cont') gaincal(vis='Mira_Band3_cont_selfcal.ms',caltable='pcal2_cont',gaintype='T', refant='DV09',calmode='p',combine='', solint='60s',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal2_cont',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, so they are applied: applycal(vis='Mira_Band3_cont_selfcal.ms',spwmap=[],spw='',field='', gaintable=['pcal2_cont'],gainfield='',calwt=F,flagbackup=F) # Round #3 of selfcalibration: # (1) Use previous mask over Mira and its companion, but enlarge if needed. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 60 iterations (in steps of 10 iterations) os.system('rm -rf Mira.contn2_p2.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2_p2', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.contn2_p1.mask', weighting='briggs',robust=0.0, niter=60,npercycle=10,threshold='') # Do third round of self-calibration averaging over 20s timescale, os.system('rm -rf pcal3_cont') gaincal(vis='Mira_Band3_cont_selfcal.ms',caltable='pcal3_cont',gaintype='T', refant='DV09',calmode='p',combine='', solint='20s',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal3_cont',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, so they are applied: applycal(vis='Mira_Band3_cont_selfcal.ms',spwmap=[],spw='',field='', gaintable=['pcal3_cont'],gainfield='',calwt=F,flagbackup=F) # Round #4 of selfcalibration: # (1) Use previous mask over Mira and its companion, but enlarge if needed. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 70 iterations (in steps of 10 iterations) os.system('rm -rf Mira.contn2_p3.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2_p3', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.contn2_p2.mask', weighting='briggs',robust=0.0, niter=70,npercycle=10,threshold='') # Do fourth round of self-calibration but no time averaging (using record length), os.system('rm -rf pcal4_cont') gaincal(vis='Mira_Band3_cont_selfcal.ms',caltable='pcal4_cont',gaintype='T', refant='DV09',calmode='p',combine='', solint='6.049s',minsnr=3.0,minblperant=6) # NOTE: no solutions found for DV07 # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal4_cont',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, so they are applied: applycal(vis='Mira_Band3_cont_selfcal.ms',spwmap=[],spw='',field='', gaintable=['pcal4_cont'],gainfield='',calwt=F,flagbackup=F) # Round #5 of selfcalibration: # (1) After phase gain calibration down to the record length, we continue # with amplitude selfcalibration, applying the last gain table (pcal4_cont). # (2) Use previous mask over Mira and its companion, but enlarge if needed. # (3) To make a precise model, we only clean a limited number of components, # in this case we limit to 120 iterations (in steps of 20 iterations) os.system('rm -rf Mira.contn2_p4.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2_p4', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.contn2_p3.mask', weighting='briggs',robust=0.0, niter=120,npercycle=20,threshold='') # Do amplitude self-calibration with time averaging (3x record length) os.system('rm -rf apcal1_cont') gaincal(vis='Mira_Band3_cont_selfcal.ms',caltable='apcal1_cont',gaintype='T', refant='DV09',calmode='ap',combine='', solint='18.15s',minsnr=5.0,minblperant=6, gaintable=['pcal4_cont'],spwmap=[],solnorm=True) # just few solutions dropped for SNR, but nothing significant # Plot phase gain solutions and check if any look strange plotcal(caltable='apcal1_cont',xaxis='time',yaxis='amp',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,0.4,1.6]) plotcal(caltable='pcal4_cont',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, so they are applied: applycal(vis='Mira_Band3_cont_selfcal.ms',spwmap=[], spw='',field='',gaintable=['pcal4_cont','apcal1_cont'], gainfield='',calwt=F,flagbackup=F) # Final continuum image with self-calibration: os.system('rm -rf Mira.contn2_selfcal.*') clean(vis='Mira_Band3_cont_selfcal.ms', imagename='Mira.contn2_selfcal', spw='',field='', mode='mfs',nterms=2,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='', weighting='briggs',robust=0.0, niter=500,npercycle=25,threshold='0.022mJy') viewer('Mira.contn2_selfcal.image.tt0') # RMS=0.028mJy # MiraA peak SNR = 1002 (improved by 20%!) # ------------------------------------------- # Self-calibration on the line emission # ------------------------------------------- # As the line emission is brighter than the continuum, we expect # the line data to give better selfcal gain solutions # ------------------------------------------- # Observed Lines # SiO v=0 '86.84696GHz' # SiO v=1 '86.24337GHz' # SiO v=2 '85.64045GHz' # 29SiO v=0 '85.75919GHz' # ------------------------------------------- # First, let examine the spectral line observations and check for detections: plotms(vis='Mira_Band3_SiOv_0.ms', yaxis='amp',xaxis='velocity', field='', spw='',avgtime='1e8',avgscan=True, transform=True,restfreq='86.84696GHz',freqframe='LSRK') # Bright line, ~2Jy peak at +47km/s plotms(vis='Mira_Band3_SiOv_1.ms', yaxis='amp',xaxis='velocity', field='', spw='',avgtime='1e8',avgscan=True, transform=True,restfreq='86.24337GHz',freqframe='LSRK') # Strongest line, ~120Jy(!) peak at +49km/s plotms(vis='Mira_Band3_SiOv_2.ms', yaxis='amp',xaxis='velocity', field='', spw='',avgtime='1e8',avgscan=True, transform=True,restfreq='85.64045GHz',freqframe='LSRK') # No detection plotms(vis='Mira_Band3_29SiOv_0.ms', yaxis='amp',xaxis='velocity', field='', spw='',avgtime='1e8',avgscan=True, transform=True,restfreq='85.75919GHz',freqframe='LSRK') # Maybe a detection? roughly at 45-50km/s # Given that the SiO v=1 line is the brightest, we select bright emission channels # from this line data. We use it for the selfcalibration process, where these few # channels are imaged using briggs/robust weighting, nterms=1, and a mask selected # during interactive mode. # First, substract continuum emission from all the line data: os.system('rm -rf Mira_Band3_SiOv_0.ms.contsub') uvcontsub(vis='Mira_Band3_SiOv_0.ms', fitspw='0~2:10~200;800~950', combine='spw',fitorder=1) os.system('rm -rf Mira_Band3_SiOv_1.ms.contsub') uvcontsub(vis='Mira_Band3_SiOv_1.ms', fitspw='0~2:10~200;800~950', combine='spw',fitorder=1) os.system('rm -rf Mira_Band3_SiOv_2.ms.contsub') uvcontsub(vis='Mira_Band3_SiOv_2.ms', fitspw='0~2:10~150;800~950', combine='spw',fitorder=1) os.system('rm -rf Mira_Band3_29SiOv_0.ms.contsub') uvcontsub(vis='Mira_Band3_29SiOv_0.ms', fitspw='0~2:10~150;800~950', combine='spw',fitorder=1) # Then, we split the few brightest channels from strongest line (SiOv=1) os.system('rm -rf SiOv1_chans.ms') split(vis='Mira_Band3_SiOv_1.ms.contsub', spw='0~2:383~386',width=4, outputvis='SiOv1_chans.ms',datacolumn='data') # Round #1 of selfcalibration: # (1) Make mask over Mira-A component first, then mask the Mira companion # after a few iterations, when the second component has better constrast. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 40 iterations (in steps of 10 iterations) os.system('rm -rf Mira.SiOv1_chans.*') clean(vis='SiOv1_chans.ms', imagename='Mira.SiOv1_chans', spw='',field='', mode='mfs',nterms=1,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='', weighting='briggs',robust=0.0, niter=30,npercycle=10,threshold='') # Do first round of self-calibration with averaging over the entire scan os.system('rm -rf pcal1_line') gaincal(vis='SiOv1_chans.ms',caltable='pcal1_line',gaintype='T', refant='DV09',calmode='p',combine='', solint='inf',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal1_line',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) ### NOTE: DV07 phase gain solution looks bad, with larger drifts in phase vs. time # appearing when the time averaging (solint) is decreased. It is also quite different # from the phase solution found in selfcal of the continuum: plotcal(caltable='pcal1_line',xaxis='time',yaxis='phase',timerange='', spw='',subplot=111,plotrange=[0,0,-180,180],antenna='DV07',overplot=True) plotcal(caltable='pcal1_cont',xaxis='time',yaxis='phase',timerange='', spw='',subplot=111,plotrange=[0,0,-180,180],antenna='DV07',overplot=True) # For comparison, here is another antenna plotcal(caltable='pcal1_line',xaxis='time',yaxis='phase',timerange='', spw='',subplot=111,plotrange=[0,0,-180,180],antenna='DA42',overplot=False) plotcal(caltable='pcal1_cont',xaxis='time',yaxis='phase',timerange='', spw='',subplot=111,plotrange=[0,0,-180,180],antenna='DA42',overplot=True) # Hence, We will flag antenna DV07 from both continuum and line datasets flagdata(vis='SiOv1_chans.ms', mode='manual', antenna='DV07', flagbackup=F) flagdata(vis='Mira_Band3_continuum.ms', mode='manual', antenna='DV07', flagbackup=F) flagdata(vis='Mira_Band3_cont_selfcal.ms', mode='manual', antenna='DV07', flagbackup=F) flagdata(vis='Mira_Band3_SiOv_0.ms', mode='manual', antenna='DV07', flagbackup=F) flagdata(vis='Mira_Band3_SiOv_1.ms', mode='manual', antenna='DV07', flagbackup=F) flagdata(vis='Mira_Band3_SiOv_2.ms', mode='manual', antenna='DV07', flagbackup=F) flagdata(vis='Mira_Band3_29SiOv_0.ms', mode='manual', antenna='DV07', flagbackup=F) # Other solutions look good, they are applied: applycal(vis='SiOv1_chans.ms',spwmap=[],spw='',field='', gaintable=['pcal1_cont'],gainfield='',calwt=F,flagbackup=F) # Round #2 of selfcalibration: # (1) Use previous mask over Mira and its companion, but enlarge if needed. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 50 iterations (in steps of 10 iterations) os.system('rm -rf Mira.SiOv1_chans_p1.*') clean(vis='SiOv1_chans.ms', imagename='Mira.SiOv1_chans_p1', spw='',field='', mode='mfs',nterms=1,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.SiOv1_chans.mask', weighting='briggs',robust=0.0, niter=40,npercycle=10,threshold='') # Do second round of self-calibration with shorter time averaging os.system('rm -rf pcal2_line') gaincal(vis='SiOv1_chans.ms',caltable='pcal2_line',gaintype='T', refant='DV09',calmode='p',combine='', solint='60s',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal2_line',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, they are applied: applycal(vis='SiOv1_chans.ms',spwmap=[],spw='',field='', gaintable=['pcal2_line'],gainfield='',calwt=F,flagbackup=F) # Round #3 of selfcalibration: # (1) Use previous mask over Mira and its companion, but enlarge if needed. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 60 iterations (in steps of 10 iterations) os.system('rm -rf Mira.SiOv1_chans_p2.*') clean(vis='SiOv1_chans.ms', imagename='Mira.SiOv1_chans_p2', spw='',field='', mode='mfs',nterms=1,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.SiOv1_chans_p1.mask', weighting='briggs',robust=0.0, niter=50,npercycle=10,threshold='') # Do second round of self-calibration with shorter time averaging os.system('rm -rf pcal3_line') gaincal(vis='SiOv1_chans.ms',caltable='pcal3_line',gaintype='T', refant='DV09',calmode='p',combine='', solint='20s',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal3_line',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, they are applied: applycal(vis='SiOv1_chans.ms',spwmap=[],spw='',field='', gaintable=['pcal3_line'],gainfield='',calwt=F,flagbackup=F) # Round #4 of selfcalibration: # (1) Use previous mask over Mira and its companion, but enlarge if needed. # (2) To make a precise model, we only clean a limited number of components, # in this case we limit to 60 iterations (in steps of 10 iterations) os.system('rm -rf Mira.SiOv1_chans_p3.*') clean(vis='SiOv1_chans.ms', imagename='Mira.SiOv1_chans_p3', spw='',field='', mode='mfs',nterms=1,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.SiOv1_chans_p2.mask', weighting='briggs',robust=0.0, niter=70,npercycle=10,threshold='') # Do second round of self-calibration with shorter time averaging os.system('rm -rf pcal4_line') gaincal(vis='SiOv1_chans.ms',caltable='pcal4_line',gaintype='T', refant='DV09',calmode='p',combine='', solint='6.049s',minsnr=3.0,minblperant=6) # Plot phase gain solutions and check if any look strange plotcal(caltable='pcal4_line',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, they are applied: applycal(vis='SiOv1_chans.ms',spwmap=[],spw='',field='', gaintable=['pcal4_line'],gainfield='',calwt=F,flagbackup=F) # Round #5 of selfcalibration: # (1) After phase gain calibration down to the record length, we continue # with amplitude selfcalibration, applying the last gain table (pcal4_line). # (2) Use previous mask over Mira and its companion, but enlarge if needed. # (3) To make a precise model, we only clean a limited number of components, # in this case we limit to 80 iterations (in steps of 20 iterations) os.system('rm -rf Mira.SiOv1_chans_p4.*') clean(vis='SiOv1_chans.ms', imagename='Mira.SiOv1_chans_p4', spw='',field='', mode='mfs',nterms=1,imagermode='csclean', imsize=900,cell='0.005arcsec', interactive=True, mask='Mira.SiOv1_chans_p3.mask', weighting='briggs',robust=0.0, niter=80,npercycle=20,threshold='') # Do amplitude self-calibration with time averaging (3x record length) os.system('rm -rf apcal1_line') gaincal(vis='SiOv1_chans.ms',caltable='apcal1_line',gaintype='T', refant='DV09',calmode='ap',combine='', solint='18.15s',minsnr=5.0,minblperant=6, gaintable=['pcal4_line'],spwmap=[],solnorm=True) # Not a single solutions dropped for SNR! (this is a bright line!) # Plot phase gain solutions and check if any look strange plotcal(caltable='apcal1_line',xaxis='time',yaxis='amp',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,0.4,1.6]) plotcal(caltable='pcal4_line',xaxis='time',yaxis='phase',timerange='', spw='',iteration='antenna,spw',subplot=421,plotrange=[0,0,-180,180]) # Solutions look good, (very smooth in amplitude, which is important since # gain variations in amplitude should vary slowly). # Hence, solutions are applied to all spectral lines: applycal(vis='SiOv1_chans.ms',spwmap=[], spw='',field='',gaintable=['pcal4_line','apcal1_line'], gainfield='',calwt=F,flagbackup=F) applycal(vis='Mira_Band3_SiOv_0.ms.contsub',spwmap=[], spw='',field='',gaintable=['pcal4_line','apcal1_line'], gainfield='',calwt=F,flagbackup=F) applycal(vis='Mira_Band3_SiOv_1.ms.contsub',spwmap=[], spw='',field='',gaintable=['pcal4_line','apcal1_line'], gainfield='',calwt=F,flagbackup=F) applycal(vis='Mira_Band3_SiOv_2.ms.contsub',spwmap=[], spw='',field='',gaintable=['pcal4_line','apcal1_line'], gainfield='',calwt=F,flagbackup=F) applycal(vis='Mira_Band3_29SiOv_0.ms.contsub',spwmap=[], spw='',field='',gaintable=['pcal4_line','apcal1_line'], gainfield='',calwt=F,flagbackup=F) # ------------------------------------------- # Imaging of spectral lines # # SiO v=0 '86.84696GHz' # SiO v=1 '86.24337GHz' # SiO v=2 '85.64045GHz' # 29SiO v=0 '85.75919GHz' # ------------------------------------------- # SiO v=2 '85.64045GHz' # Imaged with natural weighting to improve SNR # Not a single cleaning iteration, since this line # seems to be a non-detection os.system('rm -rf Mira_Band3.SiOv_2_ap.*') clean(vis='Mira_Band3_SiOv_2.ms.contsub', imagename='Mira_Band3.SiOv_2_ap', spw='0~2', mode='velocity',imagermode='csclean', imsize=900,cell='0.01arcsec', start='30km/s',width='0.4km/s',nchan=100, outframe='LSRK',restfreq='85.64045GHz', interactive=True, mask='', weighting='briggs',robust=2.0, niter=0,threshold='0.0mJy', usescratch=True) viewer('Mira_Band3.SiOv_2_ap.image') # SiO v=0 '86.84696GHz' # Imaged with robust weighting of 0.5, and selected # a different mask for every channel with emission os.system('rm -rf Mira_Band3.SiOv_0_ap.*') clean(vis='Mira_Band3_SiOv_0.ms.contsub', imagename='Mira_Band3.SiOv_0_ap', spw='0~2', mode='velocity',imagermode='csclean', imsize=900,cell='0.01arcsec', start='30km/s',width='0.4km/s',nchan=100, outframe='LSRK',restfreq='86.84696GHz', interactive=True, mask='', #'Mira_Band3.SiOv_0_ap_Mask4EveryChannel.mask', weighting='briggs',robust=0.5, multiscale=[0,10,30,60], niter=10000,npercycle=50,threshold='0.0mJy', usescratch=True) viewer('Mira_Band3.SiOv_0_ap.image') # 29SiO v=0 '85.75919GHz' # Imaged with robust weighting of 0.5, and selected # a different mask for every channel with emission os.system('rm -rf Mira_Band3.29SiOv_0_ap.*') clean(vis='Mira_Band3_29SiOv_0.ms.contsub', imagename='Mira_Band3.29SiOv_0_ap', spw='0~2', mode='velocity',imagermode='csclean', imsize=900,cell='0.01arcsec', start='30km/s',width='0.4km/s',nchan=100, outframe='LSRK',restfreq='85.75919GHz', interactive=True, mask='', weighting='briggs',robust=0.5, multiscale=[0,10,30,60], niter=10000,npercycle=50,threshold='0.0mJy', usescratch=True) viewer('Mira_Band3.29SiOv_0_ap.image') # SiO v=1 '86.24337GHz' # Imaged with robust weighting of 0.5, and selected # a different mask for every channel with emission # (Harder to clean than other lines as emission is # quite strong over a few channels) os.system('rm -rf Mira_Band3.SiOv_1_ap.*') clean(vis='Mira_Band3_SiOv_1.ms.contsub', imagename='Mira_Band3.SiOv_1_ap', spw='0~2', mode='velocity',imagermode='csclean', imsize=900,cell='0.01arcsec', start='30km/s',width='0.4km/s',nchan=100, outframe='LSRK',restfreq='86.24337GHz', interactive=True, mask='', weighting='briggs',robust=0.5, multiscale=[0,10,30,60], niter=10000,npercycle=10,threshold='0.0mJy', usescratch=True) viewer('Mira_Band3.SiOv_1_ap.image') # Moment maps: immoments(imagename='Mira_Band3.SiOv_1_ap.image', chans='31~64',moments=[0], outfile='Mira_Band3.SiOv_1_ap.image.mom0') immoments(imagename='Mira_Band3.SiOv_0_ap.image', chans='22~60',moments=[0], outfile='Mira_Band3.SiOv_0_ap.image.mom0') immoments(imagename='Mira_Band3.29SiOv_0_ap.image', chans='23~62',moments=[0], outfile='Mira_Band3.29SiOv_0_ap.image.mom0') # ------------------------------------------- # Export self-calibrated data to fits files # ------------------------------------------- # Continuum exportfits(imagename='Mira.contn2_selfcal.image.tt0', fitsimage='fits_files/Mira.continuum.image.fits') #Spectral lines exportfits(imagename='Mira_Band3.SiOv_0_ap.image', fitsimage='fits_files/Mira_Band3.SiOv_0.fits') exportfits(imagename='Mira_Band3.SiOv_0_ap.image.mom0', fitsimage='fits_files/Mira_Band3.SiOv_0.mom0.fits') exportfits(imagename='Mira_Band3.SiOv_1_ap.image', fitsimage='fits_files/Mira_Band3.SiOv_1.fits') exportfits(imagename='Mira_Band3.SiOv_1_ap.image.mom0', fitsimage='fits_files/Mira_Band3.SiOv_1.mom0.fits') exportfits(imagename='Mira_Band3.SiOv_2_ap.image', fitsimage='fits_files/Mira_Band3.SiOv_2.fits') exportfits(imagename='Mira_Band3.29SiOv_0_ap.image', fitsimage='fits_files/Mira_Band3.29SiOv_0.fits') exportfits(imagename='Mira_Band3.29SiOv_0_ap.image.mom0', fitsimage='fits_files/Mira_Band3.29SiOv_0.mom0.fits')