<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/xmlcasa/xml/casa.xsd" xmlns="http://casa.nrao.edu/schema/psetTypes.html" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<task type="function" name="vishead" category="information, manipulation">
<shortdescription>List, summary, get, and put metadata in a measurement set</shortdescription>
This task allows the user to manipulate some meta-data keywords in a
measurement set. The mode='list' shows those keywords that are
presently implemented, with their values. The contents associated
with the keywords can be obtained with mode='get' and changed with mode='put'.
The modes that are available are:
list --- List all keywords that are recognized, and list the
value(s) for each. Only these keywords can be obtained
summary --- Provides a summary that is equivalent to running listobs(verbose=False)
get --- Get the specified keyword value(s) from the ms
put --- Put the specified keyword value(s) into the ms
Keywords currently implemented are:
fld_code Field Observing codes
ptcs Phase tracking centers for each field
spw_name Spectral parameters?
source_name Source Names (=Field Names?)
Note that the default list of keywords is a subset of the former list. To get
all the keywords set listitemts=[]. See task parameter listitems for more details.
<param type="path" name="vis" kind="ms" mustexist="true"><shortdescription>Name of input visibility file</shortdescription><description>Name of input visibility file</description>
<example>vis='ngc5921.ms'</example>
<param type="string" name="mode"><shortdescription>Mode of operation for vishead</shortdescription><description>Mode of operation for vishead</description>
To list the available keywords in a MeasurementSet:
vishead(vis='measurementset.ms',mode='list')
To get a field name (string),
hdvalue=vishead(vis = '3C84C.ms', mode = 'get', hdkey = 'field', hdindex = '2');
print(hdvalue[0]) -> the name for field='2'
To get an phase center (number)
hdvalue = vishead(vis = '3C84C.ms', mode = 'get', hdkey = 'ptcs', hdindex = '1');
hdvalue[0][0] gives the ra, hdvalue[0][1] gives the dec in field '1'
vishead(vis = '3C84C.ms', mode = 'put', hdkey = 'field', hdindex = '2', hdvalue = 'junk')
field='2' is renamed 'junk'
<param type="stringVec" name="listitems" subparam="true"><shortdescription>Keyword items to list. This parameter is only relevant in list mode. Note that the default list is a subset of the possible keywords. To get all the keywords set listitems=[]</shortdescription><description>Keyword items to list. This parameter is only relevant in list mode. Note that the default list is a subset of the possible keywords. To get all the keywords set listitems=[]</description>
<value type="string">telescope</value>
<value type="string">observer</value>
<value type="string">project</value>
<value type="string">field</value>