0.1.62 sdplot
Requires:
Synopsis ASAP SD plotting task
Description
ASAP SD plotting task
Modified 2008-09-17 KS Modified 2008-09-15 TT Modified 2008-07-31 TT
Modified 2008-07-15 KS Modified 2008-01-30 TT Task Version 2007-03-04
STM
Arguments
|
|
|
|
| Inputs | |
|
| sdfile | | name of input SD dataset
|
| | | allowed: | string |
| | | Default: | |
| fluxunit | | units for line flux (K,Jy) (”=current)
|
| | | allowed: | string |
| | | Default: | |
| telescopeparm | | param of telescope for flux conversion
|
| | | allowed: | any |
| | | Default: | variant |
| specunit | | units for spectral axis (channel,km/s,GHz)
|
| | | allowed: | string |
| | | Default: | |
| restfreq | | rest frequency (float value or string with unit)
|
| | | allowed: | any |
| | | Default: | variant |
| frame | | frequency reference frame, e.g. LSRK (”=current)
|
| | | allowed: | string |
| | | Default: | |
| doppler | | doppler convention, e.g. RADIO (”=current)
|
| | | allowed: | string |
| | | Default: | |
| scanlist | | list of scans to use (e.g. [1,2,3,4])
|
| | | allowed: | intArray |
| | | Default: | |
| field | | string for selection by source name
|
| | | allowed: | string |
| | | Default: | |
| iflist | | list of IF ids to select (e.g. [0,1])
|
| | | allowed: | intArray |
| | | Default: | |
| pollist | | list of polarization ids to select (e.g. [0,1])
|
| | | allowed: | intArray |
| | | Default: | |
| scanaverage | | average integs within scans (True,False)
|
| | | allowed: | bool |
| | | Default: | False |
| timeaverage | | average scans over time (True,False)
|
| | | allowed: | bool |
| | | Default: | False |
| tweight | | weighting for time averaging
|
| | | allowed: | string |
| | | Default: | none |
| polaverage | | average over polarizations (True,False)
|
| | | allowed: | bool |
| | | Default: | False |
| pweight | |
|
| | | allowed: | string |
| | | Default: | none |
| kernel | | type of spectral smoothing
|
| | | allowed: | string |
| | | Default: | none |
| kwidth | | width of spectral kernel in channels
|
| | | allowed: | int |
| | | Default: | 5 |
| plottype | | type of plot (spectra, totalpower, azel, pointing)
|
| | | allowed: | string |
| | | Default: | spectra |
| stack | | code for stacking on single plot for spectral plotting
|
| | | allowed: | string |
| | | Default: | p |
| panel | | code for splitting into multiple panels for spectral
plotting
|
| | | allowed: | string |
| | | Default: | i |
| flrange | | range for flux axis of plot for spectral plotting
|
| | | allowed: | doubleArray |
| | | Default: | |
| sprange | | range for spectral axis of plot
|
| | | allowed: | any |
| | | Default: | variant |
| linecat | | control for line catalog plotting for spectral plotting
|
| | | allowed: | string |
| | | Default: | none |
| linedop | | doppler offset for line catalog plotting (spectral plotting)
|
| | | allowed: | double |
| | | Default: | 0.0 |
| colormap | | the colours to be used for plot lines
|
| | | allowed: | string |
| | | Default: | none |
| linestyles | | the linestyles to be used for plot lines
|
| | | allowed: | string |
| | | Default: | none |
| linewidth | | width of plotted lines
|
| | | allowed: | any |
| | | Default: | variant 1 |
| histogram | | plot histogram
|
| | | allowed: | bool |
| | | Default: | False |
| plotfile | | file name for hardcopy output
|
| | | allowed: | string |
| | | Default: | |
| overwrite | | overwrite the output file if already exists
|
| | | allowed: | bool |
| | | Default: | False |
| |
Returns
void
Example
Keyword arguments:
sdfile -- name of input SD dataset
fluxunit -- units for line flux
options: ’K’,’Jy’,’’
default: ’’ (keep current fluxunit)
WARNING: For GBT data, see description below.
>>> fluxunit expandable parameter
telescopeparm -- the telescope characteristics
options: (str) name or (list) list of gain info
default: ’’ (none set)
example: if telescopeparm=’’, it tries to get the telescope
name from the data.
Full antenna parameters (diameter,ap.eff.) known
to ASAP are
’ATPKSMB’, ’ATPKSHOH’, ’ATMOPRA’, ’DSS-43’,
’CEDUNA’,’HOBART’. For GBT, it fixes default fluxunit
to ’K’ first then convert to a new fluxunit.
telescopeparm=[104.9,0.43] diameter(m), ap.eff.
telescopeparm=[0.743] gain in Jy/K
telescopeparm=’FIX’ to change default fluxunit
see description below
specunit -- units for spectral axis
options: (str) ’channel’,’km/s’,’GHz’,’MHz’,’kHz’,’Hz’
default: ’’ (=current)
example: this will be the units for masklist
restfreq -- rest frequency used for specunit=’km/s’
default: ’’ (use current setting)
example: 4.6e10 (float value), ’46GHz’ (string with unit)
Allowed units are ’THz’, ’GHz’, ’MHz’, ’kHz’, and ’Hz’
frame -- frequency frame for spectral axis
options: (str) ’LSRK’,’REST’,’TOPO’,’LSRD’,’BARY’,
’GEO’,’GALACTO’,’LGROUP’,’CMB’
default: currently set frame in scantable
WARNING: frame=’REST’ not yet implemented
doppler -- doppler mode
options: (str) ’RADIO’,’OPTICAL’,’Z’,’BETA’,’GAMMA’
default: currently set doppler in scantable
scanlist -- list of scan numbers to process
default: [] (use all scans)
example: [21,22,23,24]
this selection is in addition to field
iflist and pollist
field -- selection string for selecting scans by name
default: ’’ (no name selection)
example: ’FLS3a*’
this selection is in addition to scanlist
iflist and pollist
iflist -- list of IF id numbers to select
default: [] (use all IFs)
example: [15]
this selection is in addition to scanlist
field and pollist
pollist -- list of polarization id numbers to select
default: [] (use all polarizations)
example: [1]
this selection is in addition to scanlist,
field, and iflist
scanaverage -- average integs within scans
options: (bool) True,False
default: False
timeaverage -- average times for multiple scan cycles
options: (bool) True,False
default: False
example: if True, this happens after calibration
>>>timeaverage expandable parameter
tweight -- weighting for time average
options: ’none’
’var’ (1/var(spec) weighted)
’tsys’ (1/Tsys**2 weighted)
’tint’ (integration time weighted)
’tintsys’ (Tint/Tsys**2)
’median’ ( median averaging)
default: ’none’
polaverage -- average polarizations
options: (bool) True,False
default: False
>>>polaverage expandable parameter
pweight -- weighting for polarization average
options: ’none’
’var’ (1/var(spec) weighted)
’tsys’ (1/Tsys**2 weighted)
kernel -- type of spectral smoothing
options: ’hanning’,’gaussian’,’boxcar’, ’none’
default: ’none’
>>>kernel expandable parameter
kwidth -- width of spectral smoothing kernel
options: (int) in channels
default: 5
example: 5 or 10 seem to be popular for boxcar
ignored for hanning (fixed at 5 chans)
(0 will turn off gaussian or boxcar)
plottype -- type of plot
options: ’spectra’,’totalpower’,’pointing’,’azel’
default: ’spectra’
stack -- code for stacking on single plot for spectral plotting
options: ’p’,’b’,’i’,’t’,’s’ or
’pol’, ’beam’, ’if’, ’time’, ’scan’
default: ’p’
example: maximum of 25 stacked spectra
stack by pol, beam, if, time, scan
panel -- code for splitting into multiple panels for spectral plotting
options: ’p’,’b’,’i’,’t’,’s’ or
’pol’, ’beam’, ’if’, ’time’, ’scan’
default: ’i’
example: maximum of 25 panels
panel by pol, beam, if, time, scan
flrange -- range for flux axis of plot for spectral plotting
options: (list) [min,max]
default: [] (full range)
example: flrange=[-0.1,2.0] if ’K’
assumes current fluxunit
sprange -- range for spectral axis of plot
options: (list) [min,max]
default: [] (full range)
example: sprange=[42.1,42.5] if ’GHz’
assumes current specunit
linecat -- control for line catalog plotting for spectral plotting
options: (str) ’all’,’none’ or by molecule
default: ’none’ (no lines plotted)
example: linecat=’SiO’ for SiO lines
linecat=’*OH’ for alcohols
uses sprange to limit catalog
WARNING: specunit must be in frequency (*Hz)
to plot from the line catalog!
and must be ’GHz’ or ’MHz’ to use
sprange to limit catalog
linedop -- doppler offset for line catalog plotting (spectral plotting)
options: (float) doppler velocity (km/s)
default: 0.0
example: linedop=-30.0
colormap -- the colours to be used for plot lines.
default: None
example: colormap="green red black cyan magenta" (html standard)
colormap="g r k c m" (abbreviation)
colormap="#008000 #00FFFF #FF0090" (RGB tuple)
The plotter will cycle through these colours
when lines are overlaid (stacking mode).
linestyles -- the linestyles to be used for plot lines.
default: None
example: linestyles="line dashed dotted dashdot dashdotdot dashdashdot".
The plotter will cycle through these linestyles
when lines are overlaid (stacking mode).
WARNING: Linestyles can be specified only one color has been set.
linewidth -- width of plotted lines.
default: 1
example: linewidth=1 (integer)
linewidth=0.75 (double)
histogram -- plot histogram
options: (bool) True, False
default: False
plotfile -- file name for hardcopy output
options: (str) filename.eps,.ps,.png
default: ’’ (no hardcopy)
example: ’specplot.eps’,’specplot.png’
Note this autodetects the format from
the suffix (.eps,.ps,.png).
overwrite -- overwrite the output file if already exists
options: (bool) True,False
default: False
DESCRIPTION:
Task sdplot displays single-dish spectra or total power data.
It assumes that the spectra have been calibrated.
It does allow selection of scans, IFs,polarizations, and
some time and channel averaging/smoothing options also,
but does not write out this data.
*** Only apply to ’spectra’ plottype ***
Note that colormap and linestyles cannot be controlled at a time.
The ’linestyles’ is ignored if both of them are specified.
Some plot options, like annotation and changing titles,
legends, fonts, and the like are not supported in this task.
You should use sd.plotter from the ASAP toolkit directly for this.
This task uses the JPL line catalog as supplied by ASAP.
If you wish to use a different catalog, or have it plot
the line IDs from top or bottom (rather than alternating),
then you will need to explore the sd toolkit also.
Note that multiple scans and IFs can in principle be handled
through stacking and paneling, but this is fairly rudimentary
at present and you have little control of what happens in
individual panels. We recommend that you use scanlist, field,
and iflist to give a single selection for each run.
Currently, setting specunit=’GHz’ fixes the x-axis span of
each IF panel to be the same (an example of the limitations
of ASAP plotting at present).
This task adds an additional toolbar to ASAP plotter which
has three buttons, ’spec value’, ’statistics’, and ’Quit’.
When the ’spec value’ button is pressed and activated, you can
display a spectral value on the toolbar along with mouse
movement. Click the LEFT-mouse button over a spectrum to select
it, and drag mouse in the panel to output the spectral value of
x-position of mouse cursor. The selection is released when you
release the mouse button.
When ’statistic’ button is pressed and activated, you can get
statistic values of a channel region selected by mouse. Select a
rectangle region with LEFT/RIGHT-mouse to SELECT/EXCLUDE the
channel region to calculate statistics for the all spectra
plotted. The results are printed on the casapy console.
Press ’Quit’ button to close the plotter.
*** other plottype options ***
Currently most of the parameters are ignored in these modes.
* plottype=’totalpower’ is used to plot the total power data.
and only plot option is amplitude versus data row number.
* plottype=’azel’ plots azimuth and elevation tracks of the source.
* plottype=’pointing’ plots antenna poinitings.
ASAP recognizes the data of the "AT" telescopes, but currently
does not know about the GBT or any other telescope. This task
does know about GBT. Telescope name is obtained from the data.
If you wish to change the fluxunit (see below), and telescopeparm=’’,
for the AT telescopes it will use internal telescope parameters for
flux conversion. For GBT, it will use an approximate aperture
efficiency conversion. If you give telescopeparm a list ,
then if the list has a single float it is assumed to
be the gain in Jy/K, if two or more elements they are assumed
to be telescope diameter (m) and aperture efficiency
respectively.
WARNING: be careful plotting otf data with lots of fields!
Please send any comments or questions about CASA or AIPS++
to aips2-requests@nrao.edu
Copyright © 2008 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
Updated daily during alpha development.