Modifying SOURCE and FIELD tables

From CASA Guides
Revision as of 16:23, 29 July 2013 by Mkrauss (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Currenly, setjy will only recognize particular strings as being associated with known calibration sources. Unfortunately, when the G192 observation was set up, the name given to the flux calibrator 3C147 is not recognized by setjy, so we need to change it in the SOURCE and FIELD tables.

We will rename the flux calibrator to be "3C147" with a capital rather than a lower-case "c". We can do this with a few CASA Toolkit commands and some Python:

# In CASA'', nomodify=False)
srcNames = tb.getcol('NAME')

You can look at the resulting array by typing "srcNames" -- the first 64 entries are '3c147-J0542+49', which we want to modify:

for element in range (0,64):
     srcNames[element] = '3C147'

Now, put the modified values back into the MS table:

tb.putcol('NAME', srcNames)

There's one more place where we need to make this modification -- the "FIELD" table:

# In CASA'', nomodify=False)
fldNames = tb.getcol('NAME')
fldNames[0] = '3C147'
tb.putcol('NAME', fldNames)

That's it! Now you can proceed with the G192 3-bit tutorial.