These are chat archives for astropy/astropy

8th
Aug 2014
Erik Tollerud
@eteq
Aug 08 2014 16:31

@bsipocz - yes, the coordinates package changed a lot prior to the 0.4 release. But it should be more stable now that the release is out

But I can’t reproduce your specific problem. If I do coordinates.SkyCoord('8:0:0 -5:00 ', unit=(u.hour,u.deg)) on astropy v0.4, I get <SkyCoord (ICRS): ra=120.0 deg, dec=-5.0 deg> out, which is what we expect, right?

Brigitta Sipocz
@bsipocz
Aug 08 2014 17:36
the problem is that simbad returns space separated coordinates, which is not working any more
and sometimes the minute value is a float
I did a fix for this, but try to solve failing tests before open a PR.
Erik Tollerud
@eteq
Aug 08 2014 17:49

Ah, I see, @bsipocz, I misunderstood.

One thing you could do if all you want is to convert to decimal degree (or use it before the next astropy release):

if ‘+’ in simbadstring:
    ra, dec = simbadstring.split(‘+’)
    dec = ‘+’ + dec
elif ‘-’ in simbadstring:
    ra, dec = simbadstring.split(‘-’)
    dec = ‘-’ + dec
else:
     raise some error

radeg = Angle(ra, u.hour).deg
decdeg = Angle(dec, u.deg).deg