|
|||
NRAO Home > CASA > CASA Task Reference Manual |
|
0.1.81 plotbandpass
Requires:
Synopsis
Makes detailed plots of Tsys and bandpass solutions.
Description
Developed at the NAASC, this is a generic task to display CASA Tsys and
bandpass solution tables with options to overlay them in various combinations,
and/or with an atmospheric transmission or sky temperature model. It works
with both the ’new’ (casa 3.4) and ’old’ calibration table formats, and allows
for mixed mode spws (e.g. TDM and FDM for ALMA). It uses the new msmd
tool to access the information about an ms. This task is still being developed
as new ALMA observing modes are commissioned. So if you encounter
problems, please report them.
Arguments
Inputs |
| ||
caltable |
| Input table name, either a bandpass solution or a Tsys
solution | |
| allowed: | string |
|
| Default: |
|
|
antenna |
| A comma-delimited string list of antennas (either names
or integer indices) for which to display solutions. Default
= all antennas. | |
| allowed: | any |
|
| Default: | variant
|
|
field |
| A comma-delimited string list of fields (either names or
integer indices) for which to display solutions. Default
= all fields. | |
| allowed: | any |
|
| Default: | variant
|
|
spw |
| A comma-delimited string list of spws for which to
display solutions. Default = all spws.
| |
| allowed: | any |
|
| Default: | variant
|
|
yaxis |
| The quantity to plot on the y-axis (”amp”, ”phase”,
”both”, ”tsys”, append ”db” for dB).
| |
| allowed: | string |
|
| Default: | amp |
|
xaxis |
| The quantity to plot on the x-axis (”chan” or ”freq”).
| |
| allowed: | string |
|
| Default: | chan | |
figfile |
| The name of the plot file to produce.
| |
| allowed: | string |
|
| Default: |
|
|
plotrange |
| The axes limits to use [x0,x1,y0,y1].
| |
| allowed: | doubleArray |
|
| Default: | 0,0,0,0 |
|
caltable2 |
| A second cal table, of type BPOLY or B, to overlay on
a B table | |
| allowed: | string |
|
| Default: |
| |
overlay |
| Show multiple solutions in same frame in different colors
(time, antenna, spw, baseband, or time,antenna)
| |
| allowed: | string |
|
| Default: |
| |
showflagged |
| Show the values of the solution, even if flagged
| |
| allowed: | bool | |
| Default: | False |
|
timeranges |
| Show only these timeranges, the first timerange being 0
| |
| allowed: | string |
|
| Default: |
| |
buildpdf |
| If True, assemble all the pngs into a pdf
| |
| allowed: | bool | |
| Default: | False |
|
caltable3 |
| A third cal table, of type BPOLY, to overlay on the first
two tables | |
| allowed: | string |
|
| Default: |
| |
markersize |
| Size of points
| |
| allowed: | int | |
| Default: | 3 |
|
density |
| dpi to use in creating PNGs and PDFs (default=108)
| |
| allowed: | int | |
| Default: | 108 |
|
interactive |
| if False, then run to completion automatically without
pause
| |
| allowed: | bool | |
| Default: | True |
|
showpoints |
| Draw points for the data (default=F for amp, T for
phase)
| |
| allowed: | any |
|
| Default: | variant auto |
|
showlines |
| Draw lines connecting the data (default=T for amp, F
for phase)
| |
| allowed: | any |
|
| Default: | variant auto |
|
subplot |
| 11..81,22,32 or 42 for RowsxColumns (default=22), any
3rd digit is ignored
| |
| allowed: | any |
|
| Default: | variant 22 | |
zoom |
| ”intersect” will zoom to overlap region of caltable with
caltable2 | |
| allowed: | string |
|
| Default: |
| |
poln |
| Polarizations to plot: ”” = all, or
”RR”,”RL”,”LR”,”LL”,”XX”,”XY”,”YX”,”YY”,”RR,LL”,”XX,YY”
| |
| allowed: | any |
|
| Default: | variant
|
|
showatm |
| Compute and overlay the atmospheric transmission
curve | |
| allowed: | bool |
|
| Default: | False | |
pwv |
| Define the pwv to use for the showatm option: ”auto”
or value in mm | |
| allowed: | any |
|
| Default: | variant auto |
|
gs |
| For buildpdf=T, full path for ghostscript command (in
case it is not found)
| |
| allowed: | string |
|
| Default: | gs |
|
convert |
| For buildpdf=T, full path for the ImageMagick convert
command (in case it is not found)
| |
| allowed: | string |
|
| Default: | convert |
|
chanrange |
| Set xrange (”5~100”) over which to autoscale y-axis for
xaxis=”freq”
| |
| allowed: | any |
|
| Default: | variant
|
|
solutionTimeThresholdSeconds |
| Consider 2 solutions simultaneous if within this interval
in seconds
| |
| allowed: | double |
|
| Default: | 30.0 |
|
debug |
| Print verbose messages for debugging purposes
| |
| allowed: | bool |
|
| Default: | False |
|
phase |
| The y-axis limits to use for phase plots when
yaxis=”both”
| |
| allowed: | any |
|
| Default: | variant
|
|
vis |
| name of the ms for this table, in case it does not match
the string in the caltable
| |
| allowed: | string |
|
| Default: |
|
|
showtsky |
| Compute and overlay the sky temperature curve instead
of transmission
| |
| allowed: | bool |
|
| Default: | False |
|
showfdm |
| when showing TDM spws, draw the locations of the
corresponding FDM spws
| |
| allowed: | bool |
|
| Default: | False |
|
showatmfield |
| for overlay=”time”, use first observation of this fieldID
or name
| |
| allowed: | any |
|
| Default: | variant
|
|
lo1 |
| specify the LO1 setting (in GHz) for the observation (”
= automatic)
| |
| allowed: | any |
|
| Default: | variant
|
|
showimage |
| also show the atmospheric curve for the image sideband
(in black)
| |
| allowed: | bool |
|
| Default: | False |
|
showatmpoints |
| Draw atmospheric curve with points instead of a line
| |
| allowed: | bool |
|
| Default: | False |
|
parentms |
| if showimage=T, name of the parent ms (only needed if
the ms has been previously split)
| |
| allowed: | string |
|
| Default: |
|
|
pdftk |
| For buildpdf=T, full path for pdftk command (in case
it is not found)
| |
| allowed: | string |
|
| Default: | pdftk |
|
channeldiff |
| Set to a value > 0 (sigma) to plot derivatives of the
solutions
| |
| allowed: | any |
|
| Default: | variant False |
|
edge |
| The number of edge channels to ignore in finding outliers
(for channeldiff>0)
| |
| allowed: | int |
|
| Default: | 8 |
|
resample |
| The channel expansion factor to use when computing
MAD of derivative (for channeldiff>0)
| |
| allowed: | int |
|
| Default: | 1 |
|
platformingThreshold |
| if platformingSigma=0, then declare platforming if the
amplitude derivative exceeds this percentage of the
median
| |
| allowed: | double |
|
| Default: | 10.0 |
|
platformingSigma |
| declare platforming if the amplitude derivative exceeds
this many times the MAD
| |
| allowed: | double |
|
| Default: | 10.0 |
|
basebands |
| A baseband number or list of baseband numbers for
which to display solutions. Default = all.
| |
| allowed: | any |
|
| Default: | variant
|
|
showBasebandNumber |
| Put the baseband converter number (BBC_NO) in the
title of each plot
| |
| allowed: | bool |
|
| Default: | False |
|
scans |
| A scan or list of scans for which to display solutions.
Default = all. Does not work with overlay=”time”.
| |
| allowed: | any |
|
| Default: | variant
|
|
figfileSequential |
| naming scheme for pngs: False: name by spw/antenna
(default), True: figfile.000.png, figfile.001.png, etc.
| |
| allowed: | bool |
|
| Default: | False |
|
chanrangeSetXrange |
| If True, then chanrange also sets the xrange to display
| |
| allowed: | bool |
|
| Default: | False |
|
variant
Example
plotbandpass(’X3c1.tsys’,overlay=’antenna’,yaxis=’amp’,field=’0~1,4’,xaxis=’chan’,figfile=’tsys.png’)
plotbandpass(’bandpass.bcal’,caltable2=’bandpass.bcal_smooth’,xaxis=’freq’)
plotbandpass(’bandpass.bcal’,caltable2=’bandpass.bcal_smooth’,xaxis=’freq’,poln=’X’,showatm=T)
plotbandpass(’bandpass.bcal’,channeldiff=’5’)
This task returns void unless the channeldiff option is selected, in which case it returns a
dictionary containing the statistics of the solutions, keyed by the antenna name, followed
by the spw, timerange, polarization, and finally ’amp’ and/or ’phase’ depending
on the yaxis selection.
Keyword arguments:
antenna: must be either an ID (int or string or list), or a single antenna name or list
basebands: show only spws from the specified baseband or list of basebands (default: ’’=[]=all)
buildpdf: True/False, if True and figfile is set, assemble pngs into a pdf
caltable: a bandpass table, of type B or BPOLY
caltable2: a second cal table, of type BPOLY or B, to overlay on a B table
caltable3: a third cal table, of type BPOLY, to overlay on the first two
channeldiff: set to value > 0 to plot derivatives of amplitude, the value is also used as sigma, and any outliers beyond this sigma will be printed to the logger
chanrange: set xrange (e.g. "5~100") over which to autoscale y-axis for xaxis=’freq’
chanrangeSetXrange: if True, then chanrange also sets the xrange to display
convert: full path for convert command (in case it’s not found)
density: dpi to use in creating PNGs and PDFs (default=108)
edge: the number of edge channels to ignore in finding outliers (for channeldiff>0)
field: must be an ID, source name, or list thereof; can use trailing *: ’J*’
figfile: the base_name of the png files to save: base_name.antX.spwY.png
figfileSequential: naming scheme, False: name by spw/antenna (default)
True: figfile.1.png, figfile.2.png, etc.
gs: full path for ghostscript command (in case it’s not found)
interactive: if False, then figfile will run to completion automatically
lo1: specify the LO1 setting (in GHz) for the observation
overlay: ’antenna’,’time’,’spw’, or ’baseband’, make 1 plot with different items in colors
markersize: size of points (default=3)
ms: name of the ms for this table, in case it does not match the string in the caltable
parentms: name of the parent ms, in case the ms has been previously split
pdftk: full path for pdftk command (in case it’s not found)
phase: the y-axis limits to use for phase plots when yaxis=’both’
platformingSigma: declare platforming if the amplitude derivative exceeds this many times the MAD
platformingThreshold: if platformingSigma=0, then declare platforming if the amplitude
derivative exceeds this percentage of the median
plotrange: define axis limits: [x0,x1,y0,y1] where 0,0 means auto
poln: polarizations to plot (e.g. ’XX’,’YY’,’RR’,’LL’ or ’’ for both)
pwv: define the pwv to use for the showatm option: ’auto’ or value in mm
resample: channel expansion factor to use when computing MAD of derivative (for channeldiff>0)
scans: show only solutions for the specified scans (int, list, or string)
showatm: compute and overlay the atmospheric transmission curve (on B or Tsys solutions)
showatmfield: use first observation of this fieldID or name
showatmPoints: draw atmospheric curve with points instead of a line
showBasebandNumber: put the BBC_NO in the title of each plot
showfdm: when showing TDM spws with xaxis=’freq’, draw locations of FDM spws
showflagged: show the values of data, even if flagged
showimage: also show the atmospheric curve for the image sideband (in black)
showtsky: compute and overlay the sky temperature curve instead of transmission
showlines: draw lines connecting the data (default=T for amp, F for phase)
showpoints: draw points for the data (default=F for amp, T for phase)
solutionTimeThresholdSeconds: consider 2 solutions simultaneous if within this interval (default=60)
spw: must be single ID or list or range (e.g. 0~4, not the original ID)
subplot: 11..81,22,32 or 42 for RowsxColumns (default=22), any 3rd digit is ignored
timeranges: show only these timeranges, the first timerange being 0
xaxis: ’chan’ or ’freq’
yaxis: ’amp’, ’tsys’, ’phase’, or ’both’ amp+phase == ’ap’. Append ’db’ for dB
zoom: ’intersect’ will zoom to overlap region of caltable with caltable2
More information about CASA may be found at the
CASA web page
Copyright © 2016 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