Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/plotants.py: 89%
27 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
1##################### generated by xml-casa (v2) from plotants.xml ##################
2##################### 84c12d385aa9594d395bbaef798024f5 ##############################
3from __future__ import absolute_import
4import numpy
5from casatools.typecheck import CasaValidator as _val_ctor
6_pc = _val_ctor( )
7from casatools.coercetype import coerce as _coerce
8from casatools.errors import create_error_string
9from .private.task_plotants import plotants as _plotants_t
10from casatasks.private.task_logging import start_log as _start_log
11from casatasks.private.task_logging import end_log as _end_log
12from casatasks.private.task_logging import except_log as _except_log
14class _plotants:
15 """
16 plotants ---- Plot the antenna distribution in the local reference frame
19 The location of the antennas in the MS will be plotted with
20 X-toward local east; Y-toward local north.
23 --------- parameter descriptions ---------------------------------------------
25 vis Name of input visibility file (MS)
26 figfile Save the plotted figure to this file
27 antindex Label antennas with name and antenna ID
28 logpos Whether to plot logarithmic positions
29 exclude Antenna name/id selection to exclude from plot
30 checkbaselines Whether to check baselines in the main table.
31 title Title for the plot
32 showgui Show plot on gui.
33 [1;42mRETURNS[1;m void
35 --------- examples -----------------------------------------------------------
38 Plot the antenna distribution in the local reference frame:
40 The location of the antennas in the MS will be plotted with
41 X-toward local east; Y-toward local north. The name of each
42 antenna is shown next to its respective location.
44 Keyword arguments:
45 vis -- Name of input visibility file (required)
46 Default: none, example: vis='ngc5921.ms'
48 figfile -- Save the plotted figure in this file
49 Default: '', example: figfile='antplot.png'
51 antindex -- Label antennas with id in addition to name
52 Default: False, example: antindex=True
54 logpos -- Produce a logarithmic position plot
55 Default: False, example: logpos=True
57 exclude -- Antenna selection string to exclude from plotting
58 Note: integers are treated as names first then as index
59 Default: '', examples: "DV23,DA02" "1,5,7" "0~3"
61 checkbaselines -- Only plot antennas in the MAIN table
62 This can be useful after a split. WARNING: Setting
63 checkbaselines to True will add to runtime in
64 proportion to the number of rows in the dataset.
65 Default: False, example: checkbaselines=True
67 title -- Title written along top of plot
68 Default: '', example: "ALMA Antenna Positions"
69 showgui -- Whether or not to display the plotting GUI
70 Default: True; example showgui=False
72 You can zoom in by pressing the magnifier button (bottom,
73 third from right) and making a rectangular region with
74 the mouse. Press the home button (leftmost button) to
75 remove zoom.
77 A hard-copy of this plot can be obtained by pressing the
78 button on the right at the bottom of the display. A file
79 dialog will allow you to choose the directory, filename,
80 and format of the export.
84 """
86 _info_group_ = """visualization, calibration"""
87 _info_desc_ = """Plot the antenna distribution in the local reference frame"""
89 def __call__( self, vis='', figfile='', antindex=False, logpos=False, exclude='', checkbaselines=False, title='', showgui=True ):
90 schema = {'vis': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'figfile': {'type': 'cStr', 'coerce': _coerce.to_str}, 'antindex': {'type': 'cBool'}, 'logpos': {'type': 'cBool'}, 'exclude': {'type': 'cStr', 'coerce': _coerce.to_str}, 'checkbaselines': {'type': 'cBool'}, 'title': {'type': 'cStr', 'coerce': _coerce.to_str}, 'showgui': {'type': 'cBool'}}
91 doc = {'vis': vis, 'figfile': figfile, 'antindex': antindex, 'logpos': logpos, 'exclude': exclude, 'checkbaselines': checkbaselines, 'title': title, 'showgui': showgui}
92 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
93 _logging_state_ = _start_log( 'plotants', [ 'vis=' + repr(_pc.document['vis']), 'figfile=' + repr(_pc.document['figfile']), 'antindex=' + repr(_pc.document['antindex']), 'logpos=' + repr(_pc.document['logpos']), 'exclude=' + repr(_pc.document['exclude']), 'checkbaselines=' + repr(_pc.document['checkbaselines']), 'title=' + repr(_pc.document['title']), 'showgui=' + repr(_pc.document['showgui']) ] )
94 task_result = None
95 try:
96 task_result = _plotants_t( _pc.document['vis'], _pc.document['figfile'], _pc.document['antindex'], _pc.document['logpos'], _pc.document['exclude'], _pc.document['checkbaselines'], _pc.document['title'], _pc.document['showgui'] )
97 except Exception as exc:
98 _except_log('plotants', exc)
99 raise
100 finally:
101 task_result = _end_log( _logging_state_, 'plotants', task_result )
102 return task_result
104plotants = _plotants( )