Create a Component List for Selfcal: Difference between revisions
From CASA Guides
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
If you want to selfcal on | If you want to selfcal on one or more point sources with known position (or a a more complicated shape such as a Gaussian), you may create your own model component list. To do so, you can use the tools like this: | ||
<source lang="python"> | <source lang="python"> | ||
# for a point source with no spectral index | |||
cl.addcomponent(flux=0.39, fluxunit='Jy',shape='point', dir='J2000 19h33m09s 15d01m20s') | |||
# for a Gaussian with a spectral index | |||
cl.addcomponent(flux=1.25, fluxunit='mJy', polarization='Stokes', | cl.addcomponent(flux=1.25, fluxunit='mJy', polarization='Stokes', | ||
dir='J2000 | dir='J2000 19h30m00s 15d00m00s', shape='gaussian', majoraxis='10arcsec', | ||
minoraxis='6arcsec', positionangle='0deg', freq='1.25GHz', | minoraxis='6arcsec', positionangle='0deg', freq='1.25GHz', | ||
spectrumtype='spectral index', index=-0.8) | spectrumtype='spectral index', index=-0.8) | ||
Line 9: | Line 14: | ||
##save it to disk | ##save it to disk | ||
cl.rename(' | cl.rename('my_component.cl') | ||
cl.close() | cl.close() | ||
## write the model into the MODEL_DATA column of your data ('myms') | ## write the model into the MODEL_DATA column of your data ('myms') | ||
ft(vis='myms', complist=' | ft(vis='myms', complist='my_component.cl') | ||
</source> | </source> | ||
Then proceed with the gaincal as in normal selfcal routines. | Then proceed with the gaincal as in normal selfcal routines. |
Revision as of 19:10, 29 February 2012
If you want to selfcal on one or more point sources with known position (or a a more complicated shape such as a Gaussian), you may create your own model component list. To do so, you can use the tools like this:
# for a point source with no spectral index
cl.addcomponent(flux=0.39, fluxunit='Jy',shape='point', dir='J2000 19h33m09s 15d01m20s')
# for a Gaussian with a spectral index
cl.addcomponent(flux=1.25, fluxunit='mJy', polarization='Stokes',
dir='J2000 19h30m00s 15d00m00s', shape='gaussian', majoraxis='10arcsec',
minoraxis='6arcsec', positionangle='0deg', freq='1.25GHz',
spectrumtype='spectral index', index=-0.8)
###you can add more components if you wish by calling addcomponent repeatedly with different params
##save it to disk
cl.rename('my_component.cl')
cl.close()
## write the model into the MODEL_DATA column of your data ('myms')
ft(vis='myms', complist='my_component.cl')
Then proceed with the gaincal as in normal selfcal routines.