Modifying SOURCE and FIELD tables
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 tb.open('G192_flagged_6s.ms/SOURCE', 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:
# In CASA for element in range (0,64): srcNames[element] = '3C147'
Now, put the modified values back into the MS table:
# In CASA tb.putcol('NAME', srcNames) tb.close()
There's one more place where we need to make this modification -- the "FIELD" table:
# In CASA tb.open('G192_flagged_6s.ms/FIELD', nomodify=False) fldNames = tb.getcol('NAME') fldNames = '3C147' tb.putcol('NAME', fldNames) tb.close()
That's it! Now you can return to the G192 3-bit tutorial to set the flux density scale.