NRAO Home > CASA > CASA Toolkit Reference Manual
componentlist.setshape - Function

1.2.1 Change the shape of the component


Description

The setshape function changes the shape of the specified components to the user specified shape.

The type argument defines what the sort of new shape to use. This can be either ’point’, ’Gaussian’, ’disk’, or ’limbdarkeneddisk’. The parsing of this string is case insensitive. The ’limbdarkeneddisk’ is an experimental disk model with the limb-darkening effect, where the sky brigtness is described as I = Io(1 - (r∕R)2)n∕2 with R being apparent body radius. The n can be set in optionalparms (if it is not set, the default value, 0.0 will be used).

If the shape type is ’point’ then the remaining arguments in this function are ignored. There are no other parameters needed to specify a point shape.

But if the shape is ’Gaussian’, ’disk’, or ’limbdarkeneddisk’, the remaining arguments are needed to fully specify the shape. The majoraxis, minoraxis and positionangle arguments are quantities (see the quanta module for a definition of a quantity). Hence they can be specified either as with string eg., ’1arcsec’ or with a record eg., [value=1, unit=’deg’].

The major axis is the width of the larger axis. For the Gaussian shape this is the full width at half maximum. And the minor axis is the width of the orthogonal axis. The positionangle is the specifies the rotation of these two axes with respect to a line connecting the poles of the current direction reference frame. If the angle is positive the the north point of the component moves in the eastern direction.

Arguments





Inputs

which

A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively

allowed:

int

Default:

type

The new shape type. A string that is either ’point’, ’Gaussian’, ’disk’i, or ’limbdarkeneddisk’

allowed:

string

Default:

disk

limbdarkeneddisk

Gaussian

Point

majoraxis

The width of the larger axis. A quantity with angular units

allowed:

any

Default:

1.0arcmin

minoraxis

The width of the smaller axis. A quantity with angular units

allowed:

any

Default:

1.0arcmin

positionangle

The rotation of the axes with respect to the reference frame. A quantity with angular units

allowed:

any

Default:

0.0deg

majoraxiserror

Error ~The width of the larger axis. A quantity with angular units

allowed:

any

Default:

0.0arcmin

minoraxiserror

Error of the width of the smaller axis. A quantity with angular units

allowed:

any

Default:

0.0arcmin

positionangleerror

Error of the rotation of the axes with respect to the reference frame. A quantity with angular units

allowed:

any

Default:

0.0deg

optionalparms

optional parameters in a vector (for limbdarkeneddisk)

allowed:

doubleArray

Default:

0.0

log

Send a message to the logger

allowed:

bool

Default:

true

Returns
bool

Example

 
 
      cl.open(’crux.cl’, nomodify=False)  
      cl.setshape(3, ’disk’,  ’45mas’, ’45mas’)  
      print cl.getshape(3)[’majoraxis’]  
 

__________________________________________________________________


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