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

1.2.1 Get the RA of the reference direction. (Not implemented not)


Description

The getrefdirra function returns the right ascension of the reference direction of the component as a formatted string. If the reference frame is something other than J2000 or B1950 the value returned is the latitude or the azimuthal angle.

The unit argument specifies the units for the returned value. It can be any angular unit (eg. ’deg’, ’rad’, ’arcsec’, ’mas’) or it can be ’angle’ or ’time’. If it is ’angle’ then the returned string is formatted in degrees, minutes, seconds ie., ’+DDD.MM.SS.sss’. If it is ’angle’ then the returned string is formatted in hours, minutes, seconds ie., ’HH:MM:SS.sss’.

The precision argument controls the numerical precision of the returned value. For the angular units it controls how many digits are in the returned string. For the ’angle’ unit, precisions of two, four & six control whether the degrees, degrees,minutes or degrees, minutes & seconds are returned. Higher precisions increase the precision of the seconds field. Similarly, for the ’time’ unit precisions of two, four & six control whether the hours, hours, minutes or hours, minutes & seconds are returned.

All directions are stored internally in double precision.

Arguments





Inputs

which

An index specifying which component. An integer between 0 and one less than the list length, inclusively

allowed:

int

Default:

unit

The angular unit of the returned value. Any string containing an angular unit or ’angle’ or ’time’

allowed:

string

Default:

deg

precision

The number of digits in the returned string. Numbers between 1 and 16 make the most sense

allowed:

int

Default:

6

Returns
string

Example

 
 
      include ’componentlist.g’  
      cl := componentlist(’crux.cl’);  
      print ’The first component is at RA: ’, cl.getrefdirra(1, ’time’),  
            ’ Dec: ’, cl.getrefdirdec(1, ’angle’),  
            ’ (’, cl.getrefdirframe(1), ’)’  
 

__________________________________________________________________


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