nraonrao
 
 NRAO Home > CASA > CasaDocument
image.setrestoringbeam - Function

1.1.1 Set the restoringbeam
Description

This function sets the restoring beam. Do not do this unless it is a correct thing to do !

You may supply the beam in one of two ways.

First, you can use the argument beam which you must assign to a record containing fields ’major’, ’minor’ and ’positionangle’. Each of these fields contains a quantity. This record is in the same format as one returned by function restoringbeam. If you leave beam unset, no action with it is taken. If the function argument beam is used, the arguments major, minor, & pa are ignored.

Second, you can use the arguments major, minor and pa. Only the ones that you assign are used. Each argument should be assigned either a quantity or a float (units are implicitly those of the current beam - or if none, arcsec for the axes and degrees for the position angle).

You may also delete the restoring beam by setting delete=T (all other arguments are then ignored).

Arguments





Inputs

major

Major axis FWHM, Quantity or float (e.g., 1arcsec). Default is unset.

allowed:

any

Default:

variant 1arcsec

minor

Minor axis FWHM, Quantity or float (e.g., 1arcsec). Default is unset.

allowed:

any

Default:

variant 1arcsec

pa

Position angle, Quantity or float (e.g., ’5deg’). Default is unset.

allowed:

any

Default:

variant 0deg

beam

The complete restoring beam (output of restoringbeam()). Default is unset.

allowed:

any

Default:

record

remove

Delete the restoring beam?

allowed:

bool

Default:

false

log

Write new beam values to the logger?

allowed:

bool

Default:

true

Returns
bool

Example

"""  
#  
print "\t----\t setrestoringbeam Ex 1 \t----"  
ia.maketestimage(’hcn’,overwrite=true)  
rb = ia.restoringbeam()        # returns beam in record  
print rb  
#{’major’: {’unit’: ’arcsec’, ’value’: 53.500004857778549},  
# ’minor’: {’unit’: ’arcsec’, ’value’: 34.199998900294304},  
# ’positionangle’: {’unit’: ’deg’, ’value’: 6.0}}  
rb[’minor’][’value’] = 12.5  
ia.setrestoringbeam(beam=rb)   # new beam specified in record  
print ia.restoringbeam()  
#{’major’: {’unit’: ’arcsec’, ’value’: 53.500004857778549},  
# ’minor’: {’unit’: ’arcsec’, ’value’: 12.5},  
# ’positionangle’: {’unit’: ’deg’, ’value’: 6.0}}  
ia.setrestoringbeam(major=’36arcsec’)  # beam specified using parameter  
print ia.restoringbeam()  
#{’major’: {’unit’: ’arcsec’, ’value’: 36.0},  
# ’minor’: {’unit’: ’arcsec’, ’value’: 12.5},  
# ’positionangle’: {’unit’: ’deg’, ’value’: 6.0}}  
ia.setrestoringbeam(remove=true)  
print ia.restoringbeam()  
#{}  
ia.setrestoringbeam(major=’53.5arcsec’,minor=’34.2arcsec’,pa=’6deg’)  
print ia.restoringbeam()  
#{’major’: {’unit’: ’arcsec’, ’value’: 53.5},  
# ’minor’: {’unit’: ’arcsec’, ’value’: 34.200000000000003},  
# ’positionangle’: {’unit’: ’deg’, ’value’: 6.0}}  
ia.close()  
#  
"""

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2007 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

Updated daily during alpha development.