|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
4.5.1 Plotting Calibration Solutions (plotcal)
The plotcal task is available for examining solutions of all of the basic solvable types (G, T, B, D, M, MF, K). The inputs are:
caltable = ’’ # Name of input calibration table
xaxis = ’’ # Value to plot along x axis (time,chan,amp,phase,real,imag,snr)
yaxis = ’’ # Value to plot along y axis (amp,phase,real,imag,snr)
poln = ’’ # Polarization to plot (RL,R,L,XY,X,Y,/)
field = ’’ # Field names or index: ’’=all, ’3C286,P1321*’, ’0~3’
antenna = ’’ # Antenna selection. E.g., antenna=’3~5’
spw = ’’ # Spectral window: ’’=all, ’0,1’ means spw 0 and 1
timerange = ’’ # Time selection ’’=all
subplot = 111 # Panel number on display screen (yxn)
overplot = False # Overplot solutions on existing display
clearpanel = ’Auto’ # Specify if old plots are cleared or not
iteration = ’’ # Iterate on antenna,time,spw,field
plotrange = [] # plot axes ranges: [xmin,xmax,ymin,ymax]
showflags = False # If true, show flags
plotsymbol = ’.’ # pylab plot symbol
plotcolor = ’blue’ # initial plotting color
markersize = 5.0 # size of plot symbols
fontsize = 10.0 # size of label font
showgui = True # Show plot on gui
figfile = ’’ # ’’= no plot hardcopy, otherwise supply name
ALERT: Currently, plotcal needs to know the MS from which caltable was derived to get indexing information. It does this using the name stored inside the table, which does not include the full path, but assumes the MS is in the cwd. Thus if you are using a MS in a directory other than the current one, it will not find it. You need to change directories using cd in IPython (or os.chdir() inside a script) to the MS location.
The controls for the plotcal window are the same as for plotxy (see § 3.3.2.1).
The xaxis and yaxis plot options available are:
- ’amp’ — amplitude,
- ’phase’ — phase,
- ’real’ – the real part,
- ’imag’ — the imaginary part,
- ’snr’ – the signal-to-noise ratio,
of the calibration solutions that are in the caltable. The xaxis choices also include ’time’ and ’channel’ which will be used as the sensible defaults (if xaxis=’’) for gain and bandpass solutions respectively.
The poln parameter determines what polarization or combination of polarization is being plotted. The poln=’RL’ plots both R and L polarizations on the same plot. The respective XY options do equivalent things. The poln=’/’ option plots amplitude ratios or phase differences between whatever polarizations are in the MS (R and L. or X and Y).
The field, spw, and antenna selection parameters are available to obtain plots of subsets of solutions. The syntax for selection is given in § 2.3.
The subplot parameter is particularly helpful in making multi-panel plots. The format is subplot=yxn where yxn is an integer with digit y representing the number of plots in the y-axis, digit x the number of panels along the x-axis, and digit n giving the location of the plot in the panel array (where n = 1, ..., xy, in order upper left to right, then down). See § 3.3.2.8 for more details on this option.
The iteration parameter allows you to select an identifier to iterate over when producing multi-panel plots. The choices for iteration are: ’antenna’, ’time’, ’spw’, ’field’. For example, if per-antenna solution plots are desired, use iteration=’antenna’. You can then use subplot to specify the number of plots to appear on each page. In this case, set the n to 1 for subplot=yxn. Use the Next button on the plotcal window to advance to the next set of plots. Note that if there is more than one timestamp in a ’B’ table, the user will be queried to interactively advance the plot to each timestamp, or if multiplot=True, the antennas plots will be cycled through for each timestamp in turn. Note that iteration can take more than one iteration choice (as a single string containing a comma-separated list of the options). ALERT: the iteration order is fixed (independent of the order specified in the iteration string), for example:
iteration = ’time, antenna, field’
will both iterate over each field (fastest) then time (next) and antenna (slowest). The order is:
from the slowest (outer loop) to fastest (inner loop).
The markersize and fontsize parameters are especially helpful in making the dot and label sizes appropriate for the plot being made. The screen shots in this section used this feature to make the plots more readable in the cookbook. Adjusting the fontsize can be tricky on multi-panel plots, as the labels can run together if too large. You can also help yourself by manually resizing the Plotter window to get better aspect ratios on the plots.
ALERT: Unfortunately, plotcal has many of the same problems that plotxy does, as they use similar code underneath. An overhaul is underway, so stay tuned.
More information about CASA may be found at the
CASA web page
Copyright © 2010 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search