0 votes
50 views
asked May 28, 2017 by datalab (3,060 points) | 50 views

1 Answer

0 votes

You can use the functionality from astropy:

from astropy.coordinates import name_resolve
coords = name_resolve.get_icrs_coordinates('Cyg A')  # Cygnus A

Print the coordinate object:

print coords
<SkyCoord (ICRS): (ra, dec) in deg
    (299.8681525, 40.7339156)>

Or access RA and Dec directly:

print coords.ra, coords.dec
299d52m05.349s 40d44m02.0962s

In decimal format:

print coords.ra.value, coords.dec.value
299.8681525 40.7339156

You can also represent them e.g. in Galactic frame:

print coords.galactic
<SkyCoord (Galactic): (l, b) in deg
    (76.18988044, 5.75538777)>

Or as decimal values:

print coords.galactic.l.value, coords.galactic.b.value
76.1898804421 5.75538777496
answered Jun 2, 2017 by robnik (1,040 points)

82 questions

65 answers

13 comments

288 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.