[AstroPy] get_sun got wrong position ?

Phil Evans pae9 at leicester.ac.uk
Fri May 20 03:15:55 EDT 2016


I can reproduce this, although I can also confirm that using ephem I get 
values ~0 as you expect.

I believe the error must be in the get_sun module, because if I print 
out t.unix from your code I get 1458448200.0, which is the same as I get 
independently converting that date/time you gave into unix time.

Not a solution to the astropy issue, but if you need the sun position 
urgently - attached is the pyephem-based script I use to get the Sun 
position (arguments are year, day-of-year, HH:MM:SS)


Phil




On 19/05/16 16:42, Yang Hon-Jang wrote:
> Hi,
>
> As I know, spring equinox of 2016 is on 2016/3/20 4:30 GMT.
>
> I execute following statements
> ====
> from astropy.time import Time
> from astropy.coordinates import get_sun
> t=Time('2016-03-20 4:30:00')
> s=get_sun(t)
> ====
> I expect to get s.ra.degree and s.dec.degree very close to 0.
> But I got s.ra.degree=0.7052336 and s.dec.degree=0.30536325.
>
> Why?  Hope some one can help me. Thanks.
>
> hjyanghj
>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy

-- 
-------------------------

Phil Evans,
Swift Development Scientist
X-ray and Observational Astronomy Group,
University of Leicester

Tel: +44 (0)116 252 5059
Mobile: +44 (0)7780 980240 (work)
Mobile: +44 (0)7974 977723 (personal)

pae9 at leicester.ac.uk

http://www.star.le.ac.uk/~pae9
http://www.swift.ac.uk

Follow me as a Swift scientist on Twitter: @swift_phil
http://www.star.le.ac.uk/~pae9/twitter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getSunPos.py
Type: text/x-python
Size: 962 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20160520/72aae353/attachment.py>


More information about the AstroPy mailing list