NRAO Home > CASA > CASA Toolkit Reference Manual
regionmanager.fromtext - Function

1.1.2 Create a region dictionary from a region text string.


Description

This function reads a region region text descriptions and converts it to a python region dictionary.

Arguments





Inputs

text

region description

allowed:

string

Default:

shape

Image shape, only used if first region is a difference.

allowed:

intArray

Default:

1

csys

Coordinate system record. Defaults to coordinate system used in rg.setcoordinates()

allowed:

record

Default:

Returns
record

Example

 
ia.open(’test.image’)  
csys=ia.coordsys()  
rg.setcoordinates(csys.torecord())  
a=rg.fromtext("ellipse [[04h31m38.44139, 18d13m57.0861], [1.0arcsec, 1.0arcsec], 0.00000000deg]", shape=[1500, 1500,    1, 1])  
ia.done()  
 
In this example, we create a circular region of 1 arcsec radius centered on J2000 04h31m38.44139  18d13m57.0861  
 

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search