TWHydraBand7 Imaging for CASA 3.3
Prepare Continuum Data for Further Processing
In order to speed up imaging/self-calibration for the continuum data we will average channels together, and then flag the few spectral features. This method works well in the case of only a few spectral lines, while retaining enough channelization to aid in multi-frequency synthesis and being able to remove spectral features in the averaged data. The amount of channel averaging should be adjusted to your particular data. Note for wide bandwidth data it is never a good idea to use the continuum estimate generated by uv-continuum subtraction as your continuum data. This worked OK in the past with the narrow band systems like the VLA and low dynamic range instruments like the SMA, but is not advised for ALMA wide bandwidth, high dynamic range data.
One can also flag the spectral features first but in that case make a backup of the file that is analogous to TWHydra_corrected.ms as you will need it later (unflagged) for spectral line imaging.
# In CASA
# In CASA
split(vis='TWHydra_corrected.ms',outputvis='TWHydra_cont.ms',
spw='0~3:22~3820',width=100,datacolumn='data')
Now make a plot of amplitude vs. channel to see what needs to be flagged
# In CASA
plotms(vis='TWHydra_cont.ms',spw='0~3',xaxis='channel',yaxis='amp',
avgtime='1e8',avgscan=T,coloraxis='spw',iteraxis='spw',xselfscale=T)
The CO(3-2) and HCO+(4-3) lines are obvious. The 4th spw; spw=3 also shows an upswing on the highest channels that is problematic, could be a weak atmospheric feature.
# In CASA
flagdata(vis='TWHydra_cont.ms',
spw=['0:16~16','2:21~21','3:33~37'])
Have a look at the continuum as a function of uv-distance. If the data are flat as a function of uv-distance the source is completely unresolved. If you see structure (in this case decreasing amplitude with uv-distance) the source is resolved.
# In CASA
plotms(vis='TWHydra_cont.ms',spw='',xaxis='uvdist',yaxis='amp',field='',avgchannel='38',
coloraxis='spw',iteraxis='spw')