vtsuperdarn / davitpy

DEPRECATED The DaViT Python project
http://vtsuperdarn.github.com/davitpy/
GNU General Public License v3.0
37 stars 59 forks source link

Enhancement: Replace getJD with more accurate algorithm #356

Closed asreimer closed 6 years ago

asreimer commented 6 years ago

Test the code by running getJD with these different inputs:

datetime(1,3,2,12)
datetime(2000,1,1,12)
datetime(2015,8,4)]

and you should get these outputs:

expected = [1721486.0,2451545.0,2457238.5]
aburrell commented 6 years ago

with: import davitpy import datetime as dt test_time = [dt.datetime(1,3,2,12), dt.datetime(2000,1,1,12), dt.datetime(2015,8,4)] for tt in test_time: print tt, davitpy.utils.calcSun.getJD(tt)

And I get the responses you gave.

aburrell commented 6 years ago

Testing against astropy, I also get the same answers.

asreimer commented 6 years ago

The testing against astropy is a great idea.

Good to merge?

aburrell commented 6 years ago

Good to merge.