Renaming a Field: Difference between revisions

From CASA Guides
Jump to navigationJump to search
(Created page with 'Sometimes sources are named the "wrong" thing in the original data set, and it would be nice to change the field name. Such as in this case I just encountered: The flux calibra…')
 
No edit summary
Line 25: Line 25:
tb.close()
tb.close()
</pre>
</pre>
The second is a bit more user-friendly, with the task browsetable:
<pre>
#  browsetable :: Browse a table (MS, calibration table, image)
tablename          = 'leotest.ms'      #  Name of input table
async              =      False        #  If true the taskname must be started using browsetable(...)
</pre>
This will bring up a GUI that looks like this:
Click on 'Table Keywords', one of the tabs at the screen's left:
Double click on 'FIELD'
Enter 'edit table' mode
Double click on the cells that need editing (in this case, those that read 'J1331+3030') and type the corrected name.

Revision as of 19:50, 10 February 2010

Sometimes sources are named the "wrong" thing in the original data set, and it would be nice to change the field name. Such as in this case I just encountered:


The flux calibrator in some data was named "J1331+3030'. Setjy only recognizes three names for this source ('3C286', '1328+307', and '1331+305')---none of which match the name given in the dataset. So, if you try to run setjy on this source, you'll see that the flux density is set to 1 Jy, which is incorrect.

2010-02-10 23:35:30 INFO setjy	##########################################
2010-02-10 23:35:30 INFO setjy	##### Begin Task: setjy              #####
2010-02-10 23:35:30 INFO  	setjy::::casa
2010-02-10 23:35:30 INFO setjy	  J1331+3030  spwid=  0  [I=1, Q=0, U=0, V=0] Jy, (default)
2010-02-10 23:35:30 INFO setjy	Selecting data
2010-02-10 23:35:30 INFO setjy	Selected 4818 out of 70290 visibilities.
2010-02-10 23:35:30 INFO setjy	Fourier transforming: replacing MODEL_DATA column
2010-02-10 23:35:30 INFO setjy	Processing after subtracting componentlist /export/home/rso-lchomiuk/test/Leo/leotest.ms.J1331+3030.spw0.tempcl
2010-02-10 23:35:30 INFO setjy	Performing interferometric gridding with convolution function SF
2010-02-10 23:35:31 INFO  	setjy::::casa
2010-02-10 23:35:31 INFO setjy	##### End Task: setjy                #####
2010-02-10 23:35:31 INFO setjy	##########################################

In order for setjy to work properly, we need to change the name of our flux calibrator. We can do this in two ways, the first using table tools:

tb.open('leotest.ms/FIELD',nomodify=False)
st=tb.selectrows(4)
st.putcol('NAME','1331+305')
st.done()
tb.close()

The second is a bit more user-friendly, with the task browsetable:

#  browsetable :: Browse a table (MS, calibration table, image)
tablename           = 'leotest.ms'      #  Name of input table
async               =      False        #  If true the taskname must be started using browsetable(...)

This will bring up a GUI that looks like this:

Click on 'Table Keywords', one of the tabs at the screen's left:

Double click on 'FIELD'

Enter 'edit table' mode

Double click on the cells that need editing (in this case, those that read 'J1331+3030') and type the corrected name.