Plotmosaic: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Line 16: Line 16:


==Examples==
==Examples==
<source lang="python">
# In CASA
au.plotmosaic('Antcont_Northall.ms',figfile=True)
</source>
<code><pre>
Mean frequency = 344.908330 GHz
Found 23 pointings
Wrote file = Antcont_Northall.ms.pointings.png
</pre></code>


<source lang="python">
<source lang="python">
Line 31: Line 21:
au.plotMosaic("30dor.cal.ms",sourceid='30 Doradus',coord='abs',figfile='/tmp/absolute.png')
au.plotMosaic("30dor.cal.ms",sourceid='30 Doradus',coord='abs',figfile='/tmp/absolute.png')
</source>
</source>
<code>
<pre>
Field IDs with matching source ID =  [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]
Field IDs with matching source ID =  [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]
Got longitude = -67.755 deg
Got longitude = -67.755 deg
Line 46: Line 36:
CASA <4>: au.plotMosaic("30dor.cal.ms",sourceid='30 Doradus',coord='rel',figfile='/tmp/relative.png')
CASA <4>: au.plotMosaic("30dor.cal.ms",sourceid='30 Doradus',coord='rel',figfile='/tmp/relative.png')
</source>
</source>
<code>
<pre>
Field IDs with matching source ID =  [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]
Field IDs with matching source ID =  [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]
Got longitude = -67.755 deg
Got longitude = -67.755 deg
Line 53: Line 43:
Field 12 is closest to the center of the area covered (3.3 arcsec away).
Field 12 is closest to the center of the area covered (3.3 arcsec away).
Wrote file = /tmp/relative.png
Wrote file = /tmp/relative.png
</code>
</pre>


[[File:relative.png]]
[[File:relative.png]]

Revision as of 17:44, 1 May 2012

Return to Analysis Utilities

This page documents the plotmosaic function of Python module analysisUtils.

This function produces a plot of the pointings in a MS with primary beam FWHM circles and field names overlaid. For a multi-source file, you can include the sourceid to limit the fields to the science target. The default coordinate system is 'relative'. You can also use 'absolute', in which case the RA and Dec are shown in decimal degrees. This could be improved to be HH:MM:SS if there is demand. (Note: plotmosaic and plotMosaic are synonyms.)

Usage:

au.plotmosaic(vis, sourceid=2, figfile='mosaic.png', coord='relative', skipsource=-1, doplot=True, help=False)

Notes:

  • The sourceid may be either an integer, integer string, or the string name of the source (but it cannot be a list).
  • If doplot=False, then the central field ID is returned as an integer. Otherwise, a list is returned which is useful for determining the required image size for clean: [centralField, maxRA, minRA, minDec, maxDec] where the angles are in units of arcsec relative to the center.
  • If coord='absolute', then nothing is returned.
  • figfile can be either a string or "True".

Examples

# In CASA
au.plotMosaic("30dor.cal.ms",sourceid='30 Doradus',coord='abs',figfile='/tmp/absolute.png')
Field IDs with matching source ID =  [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]
Got longitude = -67.755 deg
Mean frequency = 225.180484 GHz
Found 24 pointings
Field 12 is closest to the center of the area covered (3.3 arcsec away).
Wrote file = /tmp/absolute.png
</code>

[[File:absolute.png]]

<source lang="python">
# In CASA
CASA <4>: au.plotMosaic("30dor.cal.ms",sourceid='30 Doradus',coord='rel',figfile='/tmp/relative.png')
</source>
<pre>
Field IDs with matching source ID =  [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23]
Got longitude = -67.755 deg
Mean frequency = 225.180484 GHz
Found 24 pointings
Field 12 is closest to the center of the area covered (3.3 arcsec away).
Wrote file = /tmp/relative.png

Relative.png