Skip to content

Commit

Permalink
Add the aberrated orbit to Ephemeris
Browse files Browse the repository at this point in the history
  • Loading branch information
moeyensj committed Aug 28, 2023
1 parent ad63e16 commit 2f4cb2a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adam_core/orbits/ephemeris.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from quivr import StringColumn, Table

from ..coordinates.cartesian import CartesianCoordinates
from ..coordinates.spherical import SphericalCoordinates


Expand All @@ -8,3 +9,4 @@ class Ephemeris(Table):
orbit_id = StringColumn(nullable=False)
object_id = StringColumn()
coordinates = SphericalCoordinates.as_column()
aberrated_orbit = CartesianCoordinates.as_column()
17 changes: 17 additions & 0 deletions adam_core/propagator/pyoorb.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,23 @@ def _generate_ephemeris(
origin=Origin.from_kwargs(code=codes),
frame="equatorial",
),
aberrated_orbit=CartesianCoordinates.from_kwargs(
x=ephemeris[:, 24],
y=ephemeris[:, 25],
z=ephemeris[:, 26],
vx=ephemeris[:, 27],
vy=ephemeris[:, 28],
vz=ephemeris[:, 29],
time=Times.from_astropy(
Time(
ephemeris[:, 0],
scale="utc",
format="mjd",
)
),
origin=Origin.from_kwargs(code=["SUN" for i in range(len(codes))]),
frame="ecliptic",
),
)
ephemeris_list.append(ephemeris)

Expand Down

0 comments on commit 2f4cb2a

Please sign in to comment.