Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: componentlist.getrefdirdec - Function Up: componentlist - Tool Previous: componentlist.getrefdir - Function


componentlist.getrefdirra - Function



Package synthesis
Module componentmodels
Tool componentlist


Get the RA of the reference direction.


Synopsis
getrefdirra(which, unit, precision)


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

which An index specifying which component
Allowed: An integer between 1 and the list length
Default: no default
unit The angular unit of the returned value.
Allowed: Any string containing an angular unit or 'angle' or 'time'
Default: deg
precision The number of digits in the returned string.
Allowed: Numbers between 1 and 16 make the most sense
Default: 6


Returns
A formatted string containing the RA of the reference direction.


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), ')'
This example prints the following:
    The first component is at RA:  12:26:36  Dec:  -063.05.55  ( J2000 )
which is the direction of the first component.



next up previous contents index
Next: componentlist.getrefdirdec - Function Up: componentlist - Tool Previous: componentlist.getrefdir - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15