casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | Static Private Attributes
sdplot_cli.sdplot_cli_ Class Reference

List of all members.

Public Member Functions

def __init__
def result
def __call__
def paramgui
def defaults
def check_params
def description
def itsdefault

Public Attributes

 parameters

Static Public Attributes

 rkey
 Handle globals or user over-ride of arguments.
 i_am_a_casapy_task
list retval
 This function sets the default values but also will return the list of parameters or the default value of a given parameter.
string valornotval
tuple retval

Private Attributes

 __bases__
 __doc__
 __globals__

Static Private Attributes

string __name__
dictionary __async__

Detailed Description

Definition at line 18 of file sdplot_cli.py.


Constructor & Destructor Documentation

Definition at line 26 of file sdplot_cli.py.


Member Function Documentation

def sdplot_cli.sdplot_cli_.__call__ (   self,
  infile = None,
  antenna = None,
  fluxunit = None,
  telescopeparm = None,
  specunit = None,
  restfreq = None,
  frame = None,
  doppler = None,
  scanlist = None,
  field = None,
  iflist = None,
  pollist = None,
  beamlist = None,
  scanaverage = None,
  timeaverage = None,
  tweight = None,
  polaverage = None,
  pweight = None,
  kernel = None,
  kwidth = None,
  plottype = None,
  stack = None,
  panel = None,
  flrange = None,
  sprange = None,
  linecat = None,
  linedop = None,
  subplot = None,
  colormap = None,
  linestyles = None,
  linewidth = None,
  histogram = None,
  center = None,
  cell = None,
  header = None,
  headsize = None,
  plotstyle = None,
  margin = None,
  legendloc = None,
  outfile = None,
  overwrite = None,
  async = None 
)
ASAP SD plotting task 
  Keyword arguments:
infile -- name of input SD dataset
antenna -- antenna name or id (only effective for MS input). 
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
    >>> specunit expandable parameter
 restfreq -- rest frequency
         default: '' (use current setting)
         example: 4.6e10 (float value in Hz),
                  '46GHz' (string with unit),
                  ['345.8GHz', 347.0e9, 356.7e9] (for each IF)
                  [{'name':'CO','value':345e9}] (a value with name)
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 or string of scan numbers to process
default: [] (use all scans)
example: [21,22,23,24], or "21~24"
this selection is in addition to field, iflist, pollist,
and beamlist
field -- selection string for selecting scans by name
default: '' (no name selection)
example: 'FLS3a*'
this selection is in addition to scanlist, iflist, pollist,
and beamlist
iflist -- list or string of IF id numbers to select
default: [] (use all IFs)
example: [15]
this selection is in addition to scanlist, field, pollist,
and beamlist
pollist -- list or string of polarization id numbers to select
default: [] (use all polarizations)
example: [1]
this selection is in addition to scanlist, field, iflist,
and beamlist
beamlist -- list or string of beam id numbers to select
default: [] (use all beams)
example: [1]
this selection is in addition to scanlist, field, iflist,
and pollist
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: 'var'   (1/var(spec) weighted)
                  'tsys'  (1/Tsys**2 weighted)
                  'tint'  (integration time weighted)
                  'tintsys'  (Tint/Tsys**2)
                  'median'  ( median averaging)
         default: 'tintsys'
polaverage -- average polarizations
options: (bool) True,False
default: False
>>>polaverage expandable parameter
 pweight -- weighting for polarization average
         options: 'var'  (1/var(spec) weighted)
                  'tsys' (1/Tsys**2 weighted)
         default: 'tsys'
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','grid'
 default: 'spectra'
    >>> plottype expandable parameters
stack -- code for stacking on single plot for spectral plotting
        options: 'p','b','i','t','s','r' or
                 'pol', 'beam', 'if', 'time', 'scan', 'row'
        default: 'p'
        example: maximum of 16 stacked spectra
                 stack by pol, beam, if, time, scan
        Note stack selection is ignored when panel='r'.
panel -- code for splitting into multiple panels for spectral plotting
        options: 'p','b','i','t','s','r' or
                 'pol', 'beam', 'if', 'time', 'scan', 'row'
        default: 'i'
        example: maximum of 16 panels
                 panel by pol, beam, if, time, scan
        Note panel selection is ignored when stack='r'.
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
center -- the central direction of gridding
        default: '' (map center)
        example: 'J2000 19h30m00 -40d00m00'
        Note currently only supports 'J2000' as direction frame
cell -- x and y cell size of gridding
        default: [] (map extent devided by # of subplots in x and y)
        example: cell=['1.0arcmin','1.0arcmin']
                 cell='1.0arcmin' (equivalent to the example above)
        Note default number of subplots is 1 x 1 in plottype='grid'.
subplot -- number of subplots (row and column) on a page
           NOTICE plotter will slow down when a large number is specified
           default: -1 (auto. for plottype='spectra', 1x1 for plottype='grid')
           example: 23 (2 rows by 3 columns)
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
header -- print header information on the plot
options: (bool) True, False
default: True
The header information is printed only on the logger when 
plottype = 'azel' and 'pointing'. 
    >>> header expandable parameter
headsize -- header font size
        options: (int)
        default: 9
plotstyle -- customise plot settings
options: (bool) True, False
default: False
    >>> plotstyle expandable parameter
margin -- a list of subplot margins in figure coordinate (0-1), 
          i.e., fraction of the figure width or height.
          The order of elements should be:
          [left, bottom, right, top, horizontal space btw panels,
          vertical space btw panels]
        example: margin = [0.125, 0.1, 0.9, 0.9, 0.2, 0.2]
legendloc -- legend location on the axes (0-10)
           options: (integer) 0 -10 
                    see help of "sd.plotter.set_legend" for 
                    the detail of location. Note that 0 ('best')
                    is very slow. 
           default: 1 ('upper right')
outfile -- 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, total power,
or pointing direction of input 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.

This task adds an additional toolbar to Matplotlib plotter. 
See the cookbook for details of its capability.

*** Data selection ***
This task allows data selection via field name, scan, IF,
polarization and beam IDs. Selection of field allows pattern
matching using asterisk, e.g., 'FLS3a*'. Selection of scans,
IFs, polarizations, and beams, is possible either by a list
of IDs or by a CASA type selection syntax using a string of 
comma separated numbers with operaters, i.e., '~', '>', '>=',
'<', and '<='.
For example, the following two selections are equivalent:
scanlist = [0, 1, 2, 7, 8, 9, 15]
scanlist = "<3,7~9,15"

*** control of plot lines in 'spectra' and 'grid' 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 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.

*** available plottypes ***
* plottype = 'spectra' plots single dish spectra. Multiple scans,
  IFs, polarizations, and beams can be handles through stacking
  and panelling.
  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.
* plottype = 'grid' plots spectra based on their pointing direction.
  The spectra are gridded by direction before plotting.
  Multiple IFs and polarizations are not handled in this mode. Only
  the first IF and polarizaion is gridded and plotted if data 
  includes multiple IDs after selections are applied. Hence, over
  plotting is not available

Currently most of the parameters are ignored in the following 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!

WARNING for the GBT raw SDFITS format data as input:
SDtasks are able to handle GBT raw SDFITS format data since the 
data filler is available. However, the functionality is not well 
tested yet, so that there may be unknown bugs.  

Definition at line 46 of file sdplot_cli.py.

def sdplot_cli.sdplot_cli_.check_params (   self,
  param = None,
  value = None,
  ipython_globals = None 
)

Definition at line 648 of file sdplot_cli.py.

def sdplot_cli.sdplot_cli_.defaults (   self,
  param = None,
  ipython_globals = None,
  paramvalue = None,
  subparam = None 
)

Definition at line 545 of file sdplot_cli.py.

def sdplot_cli.sdplot_cli_.description (   self,
  key = 'sdplot',
  subkey = None 
)

Definition at line 679 of file sdplot_cli.py.

def sdplot_cli.sdplot_cli_.itsdefault (   self,
  paramname 
)
def sdplot_cli.sdplot_cli_.paramgui (   self,
  useGlobals = True,
  ipython_globals = None 
)
Opens a parameter GUI for this task.  If useGlobals is true, then any relevant global parameter settings are used.

Definition at line 521 of file sdplot_cli.py.

def sdplot_cli.sdplot_cli_.result (   self,
  key = None 
)

Definition at line 33 of file sdplot_cli.py.

References accum_cli.accum_cli_.__async__, sdplot_cli.sdplot_cli_.__async__, sdmath_cli.sdmath_cli_.__async__, sdlist_cli.sdlist_cli_.__async__, sdimprocess_cli.sdimprocess_cli_.__async__, sdimaging_cli.sdimaging_cli_.__async__, sdgrid_cli.sdgrid_cli_.__async__, sdflagmanager_cli.sdflagmanager_cli_.__async__, sdflag_cli.sdflag_cli_.__async__, sdfit_cli.sdfit_cli_.__async__, sdcoadd_cli.sdcoadd_cli_.__async__, sdcal_cli.sdcal_cli_.__async__, sdbaseline_cli.sdbaseline_cli_.__async__, rmtables_cli.rmtables_cli_.__async__, predictcomp_cli.predictcomp_cli_.__async__, polcal_cli.polcal_cli_.__async__, plotxy_cli.plotxy_cli_.__async__, plotweather_cli.plotweather_cli_.__async__, plotuv_cli.plotuv_cli_.__async__, plotms_cli.plotms_cli_.__async__, plotcal_cli.plotcal_cli_.__async__, plotants_cli.plotants_cli_.__async__, peel_cli.peel_cli_.__async__, pclean_cli.pclean_cli_.__async__, partition_cli.partition_cli_.__async__, msview_cli.msview_cli_.__async__, msmoments_cli.msmoments_cli_.__async__, mosaic_cli.mosaic_cli_.__async__, makemask_cli.makemask_cli_.__async__, listvis_cli.listvis_cli_.__async__, listsdm_cli.listsdm_cli_.__async__, listpartition_cli.listpartition_cli_.__async__, listobs_cli.listobs_cli_.__async__, listhistory_cli.listhistory_cli_.__async__, listfits_cli.listfits_cli_.__async__, listcal_cli.listcal_cli_.__async__, imview_cli.imview_cli_.__async__, imval_cli.imval_cli_.__async__, imtrans_cli.imtrans_cli_.__async__, imsubimage_cli.imsubimage_cli_.__async__, imstat_cli.imstat_cli_.__async__, imsmooth_cli.imsmooth_cli_.__async__, imregrid_cli.imregrid_cli_.__async__, imreframe_cli.imreframe_cli_.__async__, importvla_cli.importvla_cli_.__async__, importuvfits_cli.importuvfits_cli_.__async__, importgmrt_cli.importgmrt_cli_.__async__, importfitsidi_cli.importfitsidi_cli_.__async__, importfits_cli.importfits_cli_.__async__, importevla_cli.importevla_cli_.__async__, importasdm_cli.importasdm_cli_.__async__, impbcor_cli.impbcor_cli_.__async__, immoments_cli.immoments_cli_.__async__, immath_cli.immath_cli_.__async__, imhead_cli.imhead_cli_.__async__, imfit_cli.imfit_cli_.__async__, imcontsub_cli.imcontsub_cli_.__async__, imcollapse_cli.imcollapse_cli_.__async__, hanningsmooth_cli.hanningsmooth_cli_.__async__, gencal_cli.gencal_cli_.__async__, gaincal_cli.gaincal_cli_.__async__, ft_cli.ft_cli_.__async__, fluxscale_cli.fluxscale_cli_.__async__, flagmanager_cli.flagmanager_cli_.__async__, flagdata_cli.flagdata_cli_.__async__, flagcmd_cli.flagcmd_cli_.__async__, fixvis_cli.fixvis_cli_.__async__, fixplanets_cli.fixplanets_cli_.__async__, find_cli.find_cli_.__async__, feather_cli.feather_cli_.__async__, exportuvfits_cli.exportuvfits_cli_.__async__, exportfits_cli.exportfits_cli_.__async__, exportasdm_cli.exportasdm_cli_.__async__, delmod_cli.delmod_cli_.__async__, deconvolve_cli.deconvolve_cli_.__async__, cvel_cli.cvel_cli_.__async__, csvclean_cli.csvclean_cli_.__async__, conjugatevis_cli.conjugatevis_cli_.__async__, concat_cli.concat_cli_.__async__, clearstat_cli.clearstat_cli_.__async__, clearplot_cli.clearplot_cli_.__async__, clearcal_cli.clearcal_cli_.__async__, clean_cli.clean_cli_.__async__, caltabconvert_cli.caltabconvert_cli_.__async__, calstat_cli.calstat_cli_.__async__, browsetable_cli.browsetable_cli_.__async__, boxit_cli.boxit_cli_.__async__, blcal_cli.blcal_cli_.__async__, bandpass_cli.bandpass_cli_.__async__, autoclean_cli.autoclean_cli_.__async__, asdmsummary_cli.asdmsummary_cli_.__async__, and applycal_cli.applycal_cli_.__async__.


Member Data Documentation

dictionary sdplot_cli.sdplot_cli_.__async__ [static, private]

Definition at line 27 of file sdplot_cli.py.

Definition at line 28 of file sdplot_cli.py.

Definition at line 333 of file sdplot_cli.py.

Referenced by uvsub_cli.uvsub_cli_.check_params(), uvcontsub2_cli.uvcontsub2_cli_.check_params(), smoothcal_cli.smoothcal_cli_.check_params(), splattotable_cli.splattotable_cli_.check_params(), tclean_cli.tclean_cli_.check_params(), testconcat_cli.testconcat_cli_.check_params(), viewer_cli.viewer_cli_.check_params(), sdscale_cli.sdscale_cli_.check_params(), uvcontsub_cli.uvcontsub_cli_.check_params(), slsearch_cli.slsearch_cli_.check_params(), ssoflux_cli.ssoflux_cli_.check_params(), vishead_cli.vishead_cli_.check_params(), wvrgcal_cli.wvrgcal_cli_.check_params(), uvcontsub3_cli.uvcontsub3_cli_.check_params(), virtualconcat_cli.virtualconcat_cli_.check_params(), sdsmooth_cli.sdsmooth_cli_.check_params(), visstat_cli.visstat_cli_.check_params(), widebandpbcor_cli.widebandpbcor_cli_.check_params(), uvmodelfit_cli.uvmodelfit_cli_.check_params(), simanalyze_cli.simanalyze_cli_.check_params(), sdsave_cli.sdsave_cli_.check_params(), sdtpimaging_cli.sdtpimaging_cli_.check_params(), split_cli.split_cli_.check_params(), sdstat_cli.sdstat_cli_.check_params(), statwt_cli.statwt_cli_.check_params(), simalma_cli.simalma_cli_.check_params(), simobserve_cli.simobserve_cli_.check_params(), setjy_cli.setjy_cli_.check_params(), widefield_cli.widefield_cli_.check_params(), specfit_cli.specfit_cli_.check_params(), sdreduce_cli.sdreduce_cli_.check_params(), uvsub_cli.uvsub_cli_.defaults(), uvcontsub2_cli.uvcontsub2_cli_.defaults(), smoothcal_cli.smoothcal_cli_.defaults(), tclean_cli.tclean_cli_.defaults(), splattotable_cli.splattotable_cli_.defaults(), testconcat_cli.testconcat_cli_.defaults(), viewer_cli.viewer_cli_.defaults(), sdscale_cli.sdscale_cli_.defaults(), slsearch_cli.slsearch_cli_.defaults(), uvcontsub_cli.uvcontsub_cli_.defaults(), wvrgcal_cli.wvrgcal_cli_.defaults(), ssoflux_cli.ssoflux_cli_.defaults(), vishead_cli.vishead_cli_.defaults(), uvcontsub3_cli.uvcontsub3_cli_.defaults(), virtualconcat_cli.virtualconcat_cli_.defaults(), sdsmooth_cli.sdsmooth_cli_.defaults(), visstat_cli.visstat_cli_.defaults(), widebandpbcor_cli.widebandpbcor_cli_.defaults(), uvmodelfit_cli.uvmodelfit_cli_.defaults(), sdsave_cli.sdsave_cli_.defaults(), simanalyze_cli.simanalyze_cli_.defaults(), sdtpimaging_cli.sdtpimaging_cli_.defaults(), sdstat_cli.sdstat_cli_.defaults(), split_cli.split_cli_.defaults(), statwt_cli.statwt_cli_.defaults(), simalma_cli.simalma_cli_.defaults(), simobserve_cli.simobserve_cli_.defaults(), setjy_cli.setjy_cli_.defaults(), widefield_cli.widefield_cli_.defaults(), specfit_cli.specfit_cli_.defaults(), sdreduce_cli.sdreduce_cli_.defaults(), uvsub_cli.uvsub_cli_.paramgui(), uvcontsub2_cli.uvcontsub2_cli_.paramgui(), smoothcal_cli.smoothcal_cli_.paramgui(), tclean_cli.tclean_cli_.paramgui(), splattotable_cli.splattotable_cli_.paramgui(), testconcat_cli.testconcat_cli_.paramgui(), viewer_cli.viewer_cli_.paramgui(), sdscale_cli.sdscale_cli_.paramgui(), slsearch_cli.slsearch_cli_.paramgui(), uvcontsub_cli.uvcontsub_cli_.paramgui(), wvrgcal_cli.wvrgcal_cli_.paramgui(), ssoflux_cli.ssoflux_cli_.paramgui(), vishead_cli.vishead_cli_.paramgui(), uvcontsub3_cli.uvcontsub3_cli_.paramgui(), virtualconcat_cli.virtualconcat_cli_.paramgui(), sdsmooth_cli.sdsmooth_cli_.paramgui(), visstat_cli.visstat_cli_.paramgui(), widebandpbcor_cli.widebandpbcor_cli_.paramgui(), uvmodelfit_cli.uvmodelfit_cli_.paramgui(), sdsave_cli.sdsave_cli_.paramgui(), simanalyze_cli.simanalyze_cli_.paramgui(), sdtpimaging_cli.sdtpimaging_cli_.paramgui(), sdstat_cli.sdstat_cli_.paramgui(), split_cli.split_cli_.paramgui(), statwt_cli.statwt_cli_.paramgui(), simalma_cli.simalma_cli_.paramgui(), simobserve_cli.simobserve_cli_.paramgui(), setjy_cli.setjy_cli_.paramgui(), widefield_cli.widefield_cli_.paramgui(), specfit_cli.specfit_cli_.paramgui(), and sdreduce_cli.sdreduce_cli_.paramgui().

string sdplot_cli.sdplot_cli_.__name__ [static, private]

Definition at line 19 of file sdplot_cli.py.

Definition at line 22 of file sdplot_cli.py.

This function sets the default values but also will return the list of parameters or the default value of a given parameter.

Definition at line 627 of file sdplot_cli.py.

Definition at line 640 of file sdplot_cli.py.

Handle globals or user over-ride of arguments.

Definition at line 21 of file sdplot_cli.py.

Definition at line 630 of file sdplot_cli.py.


The documentation for this class was generated from the following file: