Renaming Antennas: Difference between revisions

From CASA Guides
Jump to navigationJump to search
(Created page with " Some arrays write their fits files with simple numbers to name the antennas. CASA will import the name but also create an antenna id (like for spw, field, etc.). Both the antenn...")
 
No edit summary
 
Line 1: Line 1:
Some arrays write their fits files with simple numbers to name the antennas. CASA will import the name but also create an antenna id (like for spw, field, etc.). Both the antenna name and ID can be used to
Some arrays write their fits files with simple numbers to name the antennas. CASA will import the name but also create an antenna id (like for spw, field, etc.). Both the antenna name and ID can be used to
identify an antenna, which is very confusing if both are numbers --
identify an antenna, which is very confusing if both are numbers --
but not the same number. The python commands below will append the
but not the same number. The python commands below will append the
antenna names with a prefix, here 'CA' to more easily distinguish them from their
antenna names with a prefix to more easily distinguish them from their
IDs. ALMA will already have antenna names that are strings, as does
IDs. ALMA will already have antenna names that are strings, as does
the EVLA.  
the EVLA.  
In the following exaample, the prefix 'CA' is added to the names of the antennas in the file 'C0104I':


<source lang="python">
<source lang="python">

Latest revision as of 18:39, 15 October 2010

Some arrays write their fits files with simple numbers to name the antennas. CASA will import the name but also create an antenna id (like for spw, field, etc.). Both the antenna name and ID can be used to identify an antenna, which is very confusing if both are numbers -- but not the same number. The python commands below will append the antenna names with a prefix to more easily distinguish them from their IDs. ALMA will already have antenna names that are strings, as does the EVLA.

In the following exaample, the prefix 'CA' is added to the names of the antennas in the file 'C0104I':

tb.open("c0104I/ANTENNA",nomodify=False)
namelist=tb.getcol("NAME").tolist()
for i in range(len(namelist)):
	name = 'CA'+namelist[i]
	print ' Changing '+namelist[i]+' to '+name
	namelist[i]=name

tb.putcol("NAME",namelist)
tb.close()