Gcecil
June 22, 2022, 3:45am
1
c = SkyCoord("15h00m00s","-29d00m00s")
c.galactic.to_string
d = SkyCoord("15h00m00s","-29d00m01s")
d.galactic.to_string
Both display (334.103, 25.979) and i don’t see how to retrieve more digits to get
334.1031, 25.9791
334.1029, 25.9788
Need 4 digits in mantissa to resolve arcseconds.
1 Like
ayshih
June 25, 2022, 4:07am
2
You can of course retrieve the components directly (e.g., c.galactic.l
or c.galactic.b
) to get the full precision. But, if you’re specifically looking for to_string()
to show more precision, here are some options:
>>> c.galactic.to_string(precision=8)
'334.10309234 25.97905714'
>>> c.galactic.to_string(style='dms')
'334d06m11.13241986s 25d58m44.60572168s'
The style
keyword is described in the docstring for SkyCoord.to_string()
. Any other keywords that you supply are passed through to Angle.to_string()
, and the precision
keyword is described in the docstring for Angle.to_string()
.
1 Like
Gcecil
June 25, 2022, 4:29am
3
Thank you, i didn’t dig deep enough into the *kwargs to find precision.