0 votes
25 views
asked May 28 by datalab (1,810 points) | 25 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 by robnik (1,000 points)

60 questions

44 answers

0 comments

11 users

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