Usage of direction2radec

Return to directory of Todd's CASA extensions

Convert a direction dictionary from radians to a sexagesimal string. See also direction2radecForSimObserve, radec2direction, rad2radec, radec2rad, and directionList2radecDegrees.


au.direction2radec(direction=None, prec=5, hmsdms=False)
  • default format = HH:MM:SS.SSSSS, +DDD:MM:SS.SSSSSS
  • hmsdms: if True, then output format is HHhMMmSS.SSSs, +DDDdMMmSS.SSSs


CASA <2>:'W51C_CO3_2.CONVL20.Tmb.fits')
CASA <3>: ia.coordmeasures([50,50])['measure']['direction']
{'m0': {'unit': 'rad', 'value': -1.2084567215131978},
 'm1': {'unit': 'rad', 'value': 0.24863017718169117},
 'refer': 'J2000',
 'type': 'direction'}
CASA <4>: mydir = ia.coordmeasures([50,50])['measure']['direction']
CASA <5>: au.direction2radec(mydir)
  Out[5]: '19:23:02.52723, +14:14:43.655324'

-- ToddHunter - 2012-11-07
Topic revision: r5 - 2014-12-21, 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