| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
First, create the imager tool if it is not already created. Then,
fill the MODEL_DATA column in the MS for the target source using the
output model from the last execution of imager.clean:
imgrC.setdata(mode='none', # Select continuum data for the target
fieldid=10); # source in field 10 (0957+561)
imgrC.ft(model='0957+561.mod'); # Fill MODEL_DATA column in the MS
Now it is possible to determine new and improved calibration
solutions. We want an incremental solution over the current G, so
do an ``atmospheric phase'' or T calibration (phase only,
polarization-independent solutions):
calC.setdata(msselect='FIELD_ID==10'); # Set data for target source
calC.reset(); # Reset apply/solve state
calC.setapply(type='P', # Arrange to apply P corrections
t=5.0);
calC.setapply(type="G", # Arrange to apply flux-scaled
t=0, # G solutions
table="ap366.fluxcal");
calC.setapply(type="D", # Arrange to apply polarization
t=0, # D-term solutions
table="ap366.dcal");
calC.setsolve(type="T", # Arrange to solve for T to
t=10, # get an incremental solution to
preavg=0, # G with a phase-only correction.
phaseonly=T,
table="ap366.tcal");
calC.state(); # Review the setapply/setsolve settings
calC.solve(); # Solve for T
# Write the output to a table
# called ap366.tcal1 on disk
calC.plotcal(plottype="PHASE", # Examine solutions
tablename="ap366.tcal",
fields=10);
The calC.state function reports in the logger window:
The following calibration components will be applied:
D table=ap366.dcal t=0 select=[]
G table=ap366.fluxcal t=0 select=[]
P table=<pre-computed> t=5 select=[]
The following calibration components will be solved for:
T table=ap366.tcal t=10 preavg=0 phaseonly=T refant=4 append=F
The calC.solve function reports messages like:
Initializing solvable atmospheric gain/transmission (T-matrix) For interval of 10 seconds, found 96 slots Applying G table from ap366.fluxcal Applying D table from ap366.dcal Solving for T T Jones Slot=1, 0957+561, spw=1: 22-May-1998/23:05:30 to 22-May-1998/23:05:35 T Jones Initial fit per unit weight = 0.0826564 Jy, sum of weights = 270 T Jones Final fit per unit weight = 0.05584 Jy after 5 iterations T Jones Slot=2, 0957+561, spw=1: 22-May-1998/23:05:40 to 22-May-1998/23:05:45 T Jones Initial fit per unit weight = 0.0727398 Jy, sum of weights = 1300 T Jones Final fit per unit weight = 0.0501334 Jy after 4 iterations ... Storing T matrix in table ap366.tcalThere is not a whole lot of difference between initial and final fits as expected because this is only an incremental solution.
Now apply the P, G, D, and T solutions and write a new CORRECTED_DATA
column for the target source in the MS. Note: Only the
calC.setapply for T needs to be set now because P, G, & D solutions
are already set up to apply:
calC.setapply(type="T", # Arrange to apply T solutions
t=0, # note: P, G, & D solutions are
table="ap366.tcal"); # already set to apply
calC.correct(); # Correct the data
Now, CLEAN the self-calibrated image of 0957+561 to see how this
process improved the image:
imgrC.setdata(mode='none', # Select continuum data for the target
fieldid=10); # source in field 10 (0957+561)
imgrC.setimage(nx=512, # Set image plane parameters
ny=512,
cellx='0.1arcsec',
celly='0.1arcsec',
stokes='IQUV', # (full polarization)
fieldid=10);
imgrC.weight(type='uniform'); # Set uniform weighting
imgrC.clean(algorithm='clark', # Image, and deconvolve using
niter=5000, # the Clark CLEAN
gain=0.1, # Write the cleaned image to the file
model='0957+561.mod2', # 0957+561.im2 on disk.
image='0957+561.im2',
residual='0957+561.resid2',
mask='0957+561.mask2',
interactive=T, # Clean interactively, have the option
npercycle=500); # to choose a new clean region every
# 500 cleaning cycles.
dv.gui(); # Use default viewer to view and analyze images.
Figure 1.22 (left) shows the ``dirty image'' that pops up on the interactive CLEAN viewer interface along with an outline of the 2 mask regions that have been specified for the image. After 500 iterations, the residual image will be displayed along with an outline showing your previously defined mask region. You will find that additional, low-level source structure becomes visible. Add additional mask regions around the low-level emission (Fig. 1.22 (right)) and continue cleaning. Use the ImageStatistics function in the mask viewer to compare the maximum residual reported in the logger window with the residual image RMS. For this example, the final logger report shows:
Clean used 500 iterations to get to a max residual of 0.000248331
While the RMS in the image is about 0.27 mJy beam-1. It is
usually not a good idea to clean below the RMS level in the residual
image, therefore, the CLEAN process was stopped at this point.
The final, self-calibrated image of the gravitational lens, 0957+561
shown in Fig. 1.23, shows additional source structure that
was only hinted at below the 3
level in the pre-self-cal
image. The image peak is now
29.7 mJy beam-1, and the RMS
is 0.29 mJy beam-1, a factor of 1.6 times better than before
self-calibration.
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, and/or D in the present example).