Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | table | |
Tool | tableplot |
Valid TaQL strings must satisfy the following conditions.
Various plotting options can be set as follows.
plotopts.nxpanels := 1; # number of panels along the horizontal axis. plotopts.nypanels := 1; # number of panels along the vertical axis. plotopts.windowsize := 5; # horizontal size of the pgplot window (inches) plotopts.aspectratio := 0.8; # aspect-ratio of the pgplot window (dx/dy) plotopts.fontsize := 1.0; # font size of labels plotopts.plotcolour := 21; # first digit : colour, second digit : colour increment (overlays) plotopts.plotsymbol := 5; # plot each point with a cross plotopts.linewidth := 2; # line width (all lines) plotopts.plotrange := [xmin,xmax,ymin,ymax] # specified plot range over-rides the data range if # it lies within the data range. plotopts.useflags := 0; # 0:plot unflagged data, 1:plot flagged data, # 2:plot both flagged and unflagged data (different colours)Plot labelling is controlled from glish.
poption | Record of plot options | ||
Allowed: | Record | ||
Default: | nxpanels=1,nypanels=1,windowsize=6, aspectratio=0.8,fontsize=1.0, plotcolour=10, plotsymbol=1, linewidth=2, plotrange=[-1e+30,1e+30,-1e+30,1e+30],useflags=0 | ||
labels | List of strings : Title,Xlabel,Ylabel | ||
Allowed: | Vector of Strings | ||
Default: | no default | ||
datastr | List of TaQL strings : X,Y | ||
Allowed: | Vector of Strings | ||
Default: | no default |
# create a tableplot tool, set tables and plot amplitude vs uvdist # for two Measurement Set tables. # Operate on channel 1 for stokes 1 and 2 using the DATA column and # produce an overlay plot. Use two different colours for each overlay # and plot both flagged and unflagged data in separate colours. tp := tableplot(); tp.settables(tabnames=['3c273.ms','3c48.ms']); plotopts.nxpanels := 1; plotopts.nypanels := 1; plotopts.windowsize := 5; plotopts.aspectratio := 0.8; plotopts.fontsize := 1.0; plotopts.plotcolour := 21; plotopts.plotstyle := 2; plotopts.linewidth := 2; plotopts.timeplot := 1; plotopts.plotsymbol := 5; plotopts.plotrange := [1000.0,2000.0,100.0,5000.0]; plotopts.useflags:=2; labels := ['Amplitude vs UVdist','uvdist','amplitude']; xystr := ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1:2,1])']; tp.plotdata(poption=plotopts,labels=labels,datastr=xystr);TaQL strings for the above example can also be written as follows.
xystr := ['SQRT(UVW[1]*UVW[1]+UVW[2]*UVW[2])','AMPLITUDE(DATA[1:2,1])'];
Multiple X-TaQL, Y-TaQL pairs can be given and result in an overlay plot. A plot of UV coverage can be obtained by an overlay plot as follows.
plotopts.nxpanels := 1; plotopts.nypanels := 1; plotopts.aspectratio := 1.0; labels := ['UV coverage','u','v']; xystr := ['UVW[1]','UVW[2]','-1*UVW[1]','-1*UVW[2]']; tp.plotdata(poption=plotopts,labels=labels,datastr=xystr);
TaQL strings for cross plots (amplitude vs channel number) can be written as follows.
xystr := ['CROSS','AMPLITUDE(DATA[1,1:32])'];