| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
In the spectral-line data set, there is an 80 mJy continuum source just south of the main line emission in NGC 5921. We can use this source to self-calibrate the line emission.
Create an image with line-free continuum channels only. First, create
an image from line-free channels 5-8:
First, create the imager tool if it is not already created. Then,
create an image of line-free continuum channels only and fill the
MODEL_DATA column for the specified channels in the MS for the target
source using the output model from the last execution of imager.clean on the continuum-only data:
imgrS:=imager(filename='ngc5921.ms');# Create imager tool if needed.
imgrS.setdata(mode='channel', # Select channel data for 4
nchan=4, # continuum-only channels in
start=2, # field 3 (target field)
step=1,
spwid=1,
fieldid=3);
imgrS.setimage(nx=256, # Imaging parameters
ny=256,
cellx='15arcsec',
celly='15arcsec',
stokes='I',
mode='channel', # Choose channel mode
nchan=1, # Grid selected channels into one.
start=2,
step=4,
fieldid=3);
imgrS.weight(type='briggs', # Robust weighting
rmode='norm',
robust=0.5);
imgrS.clean(algorithm='clark', # Image and deconvolve with Clark CLEAN
niter=6000, # to a threshold of 2 mJy
gain=0.1, # Write the cleaned image,
threshold='0Jy', # ngc5921.c1.im and the model,
model='ngc5921.c1.mod', # image ngc5921.c1.mod to disk
image='ngc5921.c1.im',
residual='ngc5921.c1.resid');
imgrS.setdata(mode='channel', # Select channel data for 4
nchan=4, # continuum-only channels in
start=2, # field 3 (target field)
step=1,
spwid=1,
fieldid=3);
imgrS.ft(model='ngc5921.c1.mod'); # Fill MODEL_DATA column in the MS
Now, to derive an incremental solution over the current G, do an
``atmospheric phase'' T calibration which will be derived from the
continuum channels which were used to create the model (phase only,
polarization-independent solutions): Note: the MODEL_DATA column is
read automatically when solving for T. Set the time interval for
the T solutions to be roughly the same as the solution intervals to
get scan-based solution intervals.
calS.setdata(mode='channel', # Select channel data for 4
nchan=4, # continuum-only channels in
start=2, # field 3 (target field)
step=1,
msselect='FIELD_ID==3');
calS.reset(); # Reset apply/solve state
calS.setapply(type="G", # Arrange to apply flux-scaled
t=0, # G solutions
table="ngc5921.fluxcal");
calS.setapply(type="B", # Arrange to apply
t=0, # Bandpass solutions
table="ngc5921.bcal");
calS.setsolve(type="T", # Arrange to solve for T to
t=100, # get an incremental solution to
preavg=0, # G with a phase-only correction.
refant=14,
phaseonly=T, # Write the output to a table
table="ngc5921.tcal"); # called ngc5921.tcal on disk
calS.state(); # Review the setapply/setsolve settings
calS.solve(); # Solve for T
calS.plotcal(plottype="PHASE", # Examine solutions
tablename="ngc5921.tcal");
The calS.state function reports in the logger window:
The following calibration components will be applied:
B table=ngc5921.bcal t=0 select=[]
G table=ngc5921.fluxcal t=0 select=[]
The following calibration components will be solved for:
T table=ngc5921.tcal t=100 preavg=0 phaseonly=T refant=14 append=F
The calS.solve function reports messages like:
Initializing solvable atmospheric gain/transmission (T-matrix) For interval of 100 seconds, found 21 slots Applying B table from ngc5921.bcal Applying G table from ngc5921.fluxcal Solving for T T Jones Slot=1, N5921, spw=1: 13-Apr-1995/09:33:00 to 13-Apr-1995/09:33:00 T Jones Initial fit per unit weight = 0.273765 Jy, sum of weights = 1.06142e+06 T Jones Final fit per unit weight = 0.26221 Jy after 9 iterations T Jones Slot=2, N5921, spw=1: 13-Apr-1995/09:34:00 to 13-Apr-1995/09:35:00 T Jones Initial fit per unit weight = 0.275376 Jy, sum of weights = 2.12285e+06 T Jones Final fit per unit weight = 0.26615 Jy after 6 iterationsThere is not a whole lot of difference between initial and final fits as expected because this is only an incremental solution. Now apply the G, B, and T solutions to ALL the data and write a new CORRECTED_DATA column for the target source in the MS:
calS.setdata(mode='channel', # Select channel data for all
nchan=63, # channels in field 3 (NGC 5921)
start=1,
step=1,
msselect='FIELD_ID==3');
calS.reset(); # Reset apply/solve state
calS.setapply(type="G", # Arrange to apply flux-scaled
t=0, # G solutions
table="ngc5921.fluxcal");
calS.setapply(type="B", # Arrange to apply
t=0, # Bandpass solutions
table="ngc5921.bcal");
calS.setapply(type="T", # Arrange to apply T solutions
t=0,
table="ngc5921.tcal");
calS.correct(); # Correct the data
CLEAN the self-calibrated image of NGC 5921 to see if the image is
improved:
imgrS.setdata(mode='channel', # Select channel data for field 3
nchan=60,
start=3,
step=1,
fieldid=3)
imgrS.setimage(nx=256, # Select imaging parameters
ny=256,
cellx='15arcsec',
celly='15arcsec',
stokes='I',
mode='channel',
nchan=60,
start=3,
step=1,
fieldid=3);
imgrS.weight(type='briggs', # Robust weighting
rmode='norm',
robust=0.5);
imgrS.clean(algorithm='hogbom', # Image and deconvolve the inner quarter
niter=6000, # of the image with Hogbom CLEAN
gain=0.1, # to a threshold of 1 mJy.
threshold='1.0mJy' # Write the cleaned image to the file
model='ngc5921.mod2', # ngc5921.im2 on disk.
image='ngc5921.im2',
residual='ngc5921.resid2'
interactive='F'
Use the viewer to examine the final source image ngc5921.im2.
The RMS is
1.1 mJy beam-1 (versus 1.3 mJy beam-1
before self-calibration). The peak of the continuum source is now
84.5 mJy beam-1. Self-calibration provided a marginal
improvement to the image.
If you have a data set in which there is a strong continuum source or strong line emission (e.g. a maser feature), and self-calibration improved the image significantly, then you can repeat the self-calibration as necessary. Note: Self-calibration can be applied to any solvable calibration component (G, T, and/or B in the present example).