Usage of deg2radec

Return to directory of Todd's CASA extensions

Convert a position (or list of positions) in RA/Dec from degrees to a sexagesimal string. Note that long lists will be slow, as I should really change the method I am using (calling rad2radec repeatedly). See also hours2radec, degfile2radec, direction2radec and rad2radec.


au.deg2radec(ra=0, dec=0, imfitdict=None, prec=5, verbose=True, hmsdms=False, delimiter=', ')
  • ra: RA in degrees, or a tuple of RA and Dec in degrees, or an array of RAs in degrees
  • dec: Dec in degrees, or an array of Decs in degrees
  • prec: number of digits after the secondsdecimal
  • hmsdms: if True, then output format is HHhMMmSS.SSSs, +DDdMMmSS.SSSs
  • default format is HH:MM:SS.SSSSS, +DD:MM:SS.SSSS


CASA <15>: au.deg2radec(13.4, -45.3)
00:53:36.00000, -45:18:00.000000
  Out[15]: '00:53:36.00000, -045:18:00.000000'

-- ToddHunter - 2012-12-07
Topic revision: r5 - 2015-09-15, 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