Plotmosaic: Difference between revisions
From CASA Guides
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(16 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
This page documents the '''plotmosaic''' function of Python module [[Analysis Utilities|analysisUtils]]. | This page documents the '''plotmosaic''' function of Python module [[Analysis Utilities|analysisUtils]]. | ||
This function produces a plot of the pointings in a MS with primary beam FWHM circles and field names overlaid. | This function produces a plot of the pointings in a MS with primary beam FWHM circles and field names overlaid. The size of the circle plotted is 1.13*lambda/dish_diameter, which is correct for ALMA antennas. If no source ID is specified, it will use the specified intent, which defaults to OBSERVE_TARGET#ON_SOURCE. Alternatively, you can include the '''sourceid''' to limit the fields to the science target. The default coordinate system is <tt>'relative'</tt>. You can also use <tt>'absolute'</tt>, in which case the RA and Dec are shown in decimal degrees. | ||
'''Usage:''' | '''Usage:''' | ||
au.plotmosaic(vis, sourceid=2, figfile='mosaic.png', coord='relative', skipsource=-1, doplot=True, help=False)<br> | *au.plotmosaic(vis, sourceid=2, figfile='mosaic.png', coord='relative', skipsource=-1, doplot=True, help=False, sciencespws=False, vm=", debug=False, intent='OBSERVE_TARGET#ON_SOURCE')*<br> | ||
Required parameters:<br> | |||
* | * vis: the name of the measurement set | ||
* | |||
* | Optional parameters:<br> | ||
* | * sourceid: may be either an integer, integer string, or the string name of the source (but it cannot be a list). | ||
* figfile: can be either a string or "True". In the latter case, the automatic name will be: [vis].pointings.[coord].png | |||
* coord: 'relative' or 'absolute' | |||
* skipsource: a source ID to skip | |||
* doplot: True or False. if 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. | |||
* sciencespws: if True, then run msmd (casa >= 4.1) or ValueMapping (casa < 4.1) to determine science spws. | |||
* vm: a ValueMapping structure (only relevant for casa < 4.1) | |||
* debug: if True, print extra messages | |||
* intent: the intent to use to select Field IDs (only used if sourceid is not specified) | |||
==Examples== | ==Examples== | ||
Line 19: | Line 27: | ||
<source lang="python"> | <source lang="python"> | ||
# In CASA | # In CASA | ||
au.plotmosaic( | CASA <2>: au.plotmosaic("30dor.cal.ms",sourceid='30 Doradus',doplot=False) | ||
</source> | </source> | ||
<pre> | |||
Mean frequency = | 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] | ||
Found | Got longitude = -67.755 deg | ||
Mean frequency = 225.180484 GHz | |||
</pre | Found 24 pointings | ||
Field 12 is closest to the center of the area covered (3.3 arcsec away). | |||
Out[18]: 12 | |||
</pre> | |||
<source lang="python"> | <source lang="python"> | ||
# In CASA | # In CASA | ||
au.plotmosaic( | CASA <3>: au.plotmosaic("30dor.cal.ms",sourceid='30 Doradus',coord='abs',figfile='/tmp/absolute.png') | ||
</source> | </source> | ||
<pre> | |||
Mean frequency = | 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] | ||
Found | Got longitude = -67.755 deg | ||
Wrote file = | Mean frequency = 225.180484 GHz | ||
</pre | Found 24 pointings | ||
Field 12 is closest to the center of the area covered (3.3 arcsec away). | |||
Wrote file = /tmp/absolute.png | |||
</pre> | |||
[[File: | [[File:absolute.png]] | ||
<source lang="python"> | <source lang="python"> | ||
# In CASA | # In CASA | ||
au.plotmosaic( | CASA <4>: au.plotmosaic("30dor.cal.ms",sourceid='30 Doradus',coord='rel',figfile='/tmp/relative.png') | ||
</source> | </source> | ||
<pre> | |||
Mean frequency = | 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] | ||
Found | Got longitude = -67.755 deg | ||
Wrote file = | Mean frequency = 225.180484 GHz | ||
</pre | Found 24 pointings | ||
Field 12 is closest to the center of the area covered (3.3 arcsec away). | |||
Wrote file = /tmp/relative.png | |||
Out[4]: | |||
[12, | |||
58.898348082265692, | |||
-56.505271415428538, | |||
59.801877597487355, | |||
-98.429477166421918] | |||
</pre> | |||
[[File: | [[File:relative.png]] |
Latest revision as of 13:47, 12 April 2014
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. The size of the circle plotted is 1.13*lambda/dish_diameter, which is correct for ALMA antennas. If no source ID is specified, it will use the specified intent, which defaults to OBSERVE_TARGET#ON_SOURCE. Alternatively, 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.
Usage:
- au.plotmosaic(vis, sourceid=2, figfile='mosaic.png', coord='relative', skipsource=-1, doplot=True, help=False, sciencespws=False, vm=", debug=False, intent='OBSERVE_TARGET#ON_SOURCE')*
Required parameters:
- vis: the name of the measurement set
Optional parameters:
- sourceid: may be either an integer, integer string, or the string name of the source (but it cannot be a list).
- figfile: can be either a string or "True". In the latter case, the automatic name will be: [vis].pointings.[coord].png
- coord: 'relative' or 'absolute'
- skipsource: a source ID to skip
- doplot: True or False. if 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.
- sciencespws: if True, then run msmd (casa >= 4.1) or ValueMapping (casa < 4.1) to determine science spws.
- vm: a ValueMapping structure (only relevant for casa < 4.1)
- debug: if True, print extra messages
- intent: the intent to use to select Field IDs (only used if sourceid is not specified)
Examples
# In CASA
CASA <2>: au.plotmosaic("30dor.cal.ms",sourceid='30 Doradus',doplot=False)
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). Out[18]: 12
# In CASA
CASA <3>: 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
# In CASA
CASA <4>: au.plotmosaic("30dor.cal.ms",sourceid='30 Doradus',coord='rel',figfile='/tmp/relative.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/relative.png Out[4]: [12, 58.898348082265692, -56.505271415428538, 59.801877597487355, -98.429477166421918]