Renaming Antennas
From CASA Guides
Jump to navigationJump to search
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, here 'CA' to more easily distinguish them from their IDs. ALMA will already have antenna names that are strings, as does the EVLA.
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()