Usage of radec2rad

Convert an RA/Dec string in sexagesimal format to RA and Dec in radians. See also radec2deg, rad2radec, direction2radec, radec2direction and radecOffsetToRadec.

Return to directory of Todd's CASA extensions


CASA <158>: au.radec2rad(radecstring)
  • The RA and Dec portions of the string can be either comma or space delimited.
  • The RA portion of the string must be colon-delimited or space-delimited, or delimited with 'h', 'm', 's' and 'd', 'm', 's'. If it is space-delimited then it must have hours, minutes, and seconds.
  • The Dec portion of the string can be either ':' or '.' or space-delimited. If it is "." or space-delimited, then it must have degrees, minutes, and seconds.


CASA <158>: au.radec2rad('12:56:11.16658 -')
  Out[158]: (3.3867508054822797, -0.10104256261260948)
CASA <7>: au.radec2rad('12:56 -05:47')
  Out[7]: (3.385938748868999, -0.10093820840700539)

-- ToddHunter - 2013-01-03

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > Radec2rad
Topic revision: 2015-04-14, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback