I'd like to get .altaz(next_several_weeks) of this comet from Skyfield and .separation_from() other planets.

It reads the JPL development ephemerides and can import star catalogs, but is there a way to add some orbital elements for a given comet or asteroid from some standard database and at least approximately propagate them to get an astrometric position and and all the other goodies Skyfield can provide from there?

If so, are these the best places to find the appropriate orbital elements for comet NEOWISE C/2020 F3?


JPL/HORIZONS                 NEOWISE (C/2020 F3)           2020-Jul-09 02:25:23
Rec #:90004465 (+COV) Soln.date: 2020-Jun-16_22:44:15      # obs: 353 (70 days)
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
  EPOCH=  2458958.5 ! 2020-Apr-19.0000000 (TDB)    RMSW= n.a.
   EC= .9991762343449366   QR= .2946766901808353   TP= 2459034.1806295365
   OM= 61.00968684540688   W= 37.27670558969492    IN= 128.9375082086831
   A= 357.7190774701175    MA= 359.9889750746684   ADIST= 715.1434782500542
   PER= 6765.8344565066    N= .000145677           ANGMOM= .01320322
   DAN= .32818             DDN= 2.87461            L= 35.4449114
   B= 28.1060796           MOID= .362501           TP= 2020-Jul-03.6806295365
Comet physical (GM= km^3/s^2; RAD= km):
   GM= n.a.                RAD= n.a.
   M1=  10.9     M2=  14.9     k1=  17.25  k2=  5.      PHCOF=  .030
COMET comments 
1: soln ref.= JPL#10, data arc: 2020-03-27 to 2020-06-05
2: k1=17.25, k2=5., phase coef.=0.03;

I can haz comets?


1 Answer 1


The Skyfield docs don't show a way to import orbital elements directly, but it can read any BSP format ephemeris you have. If you request a HORIZONS-generated binary SPK file for the comet, that might be enough to do the job.

  • 1
    $\begingroup$ Oh that's great news! These are not exactly the same, but seem related: space.stackexchange.com/a/19263/12102 and space.stackexchange.com/q/28087/12102 and space.stackexchange.com/q/28338/12102 $\endgroup$
    – uhoh
    Jul 9, 2020 at 10:50
  • 1
    $\begingroup$ Skyfield's changelog shows that Kepler Orbits have just been added! Maybe you can mention this in your answer and I can accept? One needs only to upgrade Skyfield to the latest version using pip install skyfield --upgrade and then run the demo with row = comets.loc['C/2020 F3 (NEOWISE)'] and it works. Thanks! $\endgroup$
    – uhoh
    Jul 10, 2020 at 2:57
  • 1
    $\begingroup$ @uhoh Since you've actually done this, I don't mind if you write that answer. $\endgroup$
    – Mike G
    Jul 12, 2020 at 13:28
  • $\begingroup$ okay thanks, It's still experimental and I haven't compared the output to Horizons yet, but I'll try to write it up tomorrow. $\endgroup$
    – uhoh
    Jul 12, 2020 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .