NGC3256Band3 for CASA 3.3
Overview
[To be written by Eric]
Retrieving the Data
The data were taken in six different datasets over two consecutive nights: April 16-17, 2011. There are three datasets for April 16th and three for April 17th. Here we provide you with "starter" datasets, where we have taken the raw data in ALMA Science Data Model (ASDM) format and converted them to CASA Measurement Sets (MS). We did this using the importasdm task in CASA.
[What else are we going to do to the data we provide?]
You can download the data here: [Provide link to the raw .ms files in tar'd, gzip'd format]
Once the download has finished, unpack the file in a terminal outside of CASA:
[Also provide links to the calibrated data (but maybe not here?)]
Initial flagging and inspection
We define an array basename that includes the names of the six files that we use here. The parameter numms is the number of measurement sets.
# In CASA
basename=["uid___A002_X1d54a1_X5","uid___A002_X1d54a1_X174","uid___A002_X1d54a1_X2e3","uid___A002_X1d5a20_X5","uid___A002_X1d5a20_X174","uid___A002_X1d5a20_X330"]
numms=len(basename)
We start with flagging the shadowed data and the autocorrelation data:
# In CASA
for name in basename:
flagdata(vis=name+".ms",flagbackup = F, mode = 'shadow')
flagautocorr(vis=name+".ms")
Store the original flags
# In CASA
flagmanager(
vis = 'ngc3256_line.ms', mode = 'save', versionname = 'Original')
Antenna DV07 shows low amplitudes and strong phase wraps on the first day of observations. We flag this antenna for the data taken on April 16:
# In CASA
flagdata(
vis='ngc3256_line.ms',
mode='manualflag',
flagbackup = F,
antenna='DV07',
timerange='<2011/04/16/15:00:00')
There are a number of scans in the data that were used by the online system for pointing calibration. We can flag these easily by selecting on 'intent':
# In CASA
flagdata(
vis='ngc3256_line.ms',
mode='manualflag',
flagbackup = F,
intent="*POINTING*")
And similarly, we can flag the scans corresponding to atmospheric calibration:
# In CASA
flagdata(
vis='ngc3256_line.ms',
mode='manualflag',
flagbackup = F,
intent="*ATMOSPHERE*")
Remove the noisy edge channels
# In CASA
flagdata(vis = 'ngc3256_line.ms', flagbackup = F, spw = ['*:0~10','*:125~127'])
Inspect the Tsys tables:
# In CASA
for name in basename:
plotcal(
caltable="tsys_"+name+".cal", xaxis="freq",
yaxis="amp", spw="1,3,5,7", timerange="<2020", subplot=221,
overplot=False, iteration="spw", plotrange=[0, 0, 40, 180],
plotsymbol=".",
figfile="tsys_per_spw"+name+".png")
Apply the Tsys values and WVR tables
# In CASA
for name in basename:
for msnumber in range (0,numms):
asdm=basename[msnumber]
for field in ['Titan','1037*','NGC*']:
applycal(vis=asdm+".ms", flagbackup=F, field=field, gainfield=field, spw='1,3,5,7',
interp='nearest', gaintable=['tsys_'+asdm+'.cal',asdm+'.W'])
Split out spectral windows 1,3,5,7
This will get rid of the channel average spws, and spw 0, which is
the one for the WVR data. Most importantly, it will remove the "WVR placeholder spws" that do not
show up in listobs, but are in the SPECTRAL_WINDOW table and can cause problems in concat and split
The WVR and Tsys tables are now applied in the DATA column:
# In CASA
for name in basename:
asdm=name
os.system('rm -rf '+asdm+'.ms*')
split(
vis=asdm+".ms",
outputvis=asdm+".ms",
datacolumn='corrected',
spw='1,3,5,7')
---More to come here---
Bandpass calibration
Before we do the bandpass calibration, we use gaincal to determine phase-only gaincal solutions for the bandpass calibrator, to correct for any phase variations with time. In these data, the phase calibrator and bandpass calibrator is the same source, so we just run this on 1037. For the solution interval we use solint='inf', which means that one gain solution will be determined for every scan. For our reference antenna, we choose PM03. The average of channels 40 to 80 is used to determine the antenna based phase solutions. The output calibration table is named "ngc3256.G1".
# In CASA
gaincal(
vis = 'ngc3256_line.ms', caltable = 'ngc3256.G1', spw = '*:40~80', field = '1037*',
selectdata=T, solint= 'inf', refant = 'PM03', calmode = 'p')
We check the time variations of the phases with plotcal. We make plot of the XX and YY polarization products separately and make different subplots for each of the spectal windows. This is donw by selecting iteration of 'spw' and subplot=221. and generate png plots
# In CASA
plotcal(
caltable = 'ngc3256.G1', xaxis = 'time', yaxis = 'phase',
poln='X', plotsymbol='o', plotrange = [0,0,-180,180], iteration = 'spw',
figfile='phase_vs_time_XX.G1.png', subplot = 221)
# In CASA
plotcal(
caltable = 'ngc3256.G1', xaxis = 'time', yaxis = 'phase',
poln='Y', plotsymbol='o', plotrange = [0,0,-180,180], iteration = 'spw',
figfile='phase_vs_time_YY.G1.png', subplot = 221)
Now that we have a first measuremnt of the phase variations as function of time, we can determine the bandpass solutions with bandpass, using the phase calibration table 'on-the-fly'.
First, plot the phase as a function of frequency for 1037. We use avgscan=T and avgtime='1E6' to average in time over all scans, and coloraxis='baseline' is used to colorize by baseline.
# In CASA
plotms(
vis='ngc3256_line.ms', xaxis='freq', yaxis='phase', selectdata=True,
field='1037*', avgtime='1E6', avgscan=T, coloraxis='baseline', iteraxis='antenna')
and the amplitudes
# In CASA
plotms(
vis='ngc3256_line.ms', xaxis='freq', yaxis='amp', selectdata=True, spw='*:10~120',
field='1037*', avgtime='1E6', avgscan=T, coloraxis='baseline', iteraxis='antenna')
# In CASA
bandpass(
vis = 'ngc3256_line.ms', caltable = 'ngc3256.B1', gaintable = 'ngc3256.G1',
field = '0', minblperant=3, minsnr=1, solint='inf',
bandtype='B', fillgaps=1, refant = 'DV10', solnorm = F)