diff --git a/README.md b/README.md index 225411a0..e4a8fb1c 100644 --- a/README.md +++ b/README.md @@ -156,12 +156,13 @@ You will need to install either adam_core[pyoorb] or adam_core[assist], or anoth #### Propagation To propagate orbits with PYOORB (here we grab some orbits from Horizons first): + ```python import numpy as np from astropy import units as u from adam_core.orbits.query import query_horizons -from adam_core.propagator import PYOORB +from adam_core.propagator import PYOORBPropagator from adam_core.time import Timestamp # Get orbits to propagate @@ -170,7 +171,7 @@ object_ids = ["Duende", "Eros", "Ceres"] orbits = query_horizons(object_ids, initial_time) # Make sure PYOORB is ready -propagator = PYOORB() +propagator = PYOORBPropagator() # Define propagation times times = initial_time.from_mjd(initial_time.mjd() + np.arange(0, 100)) @@ -186,14 +187,21 @@ propagated_orbits = propagator.propagate_orbits( ``` #### Ephemeris Generation -The propagator class can also be used to generate ephemerides for a set of orbits and observers. +Ephemeris generation requires a propagator that implements the EphemerisMixin interface. This is currently only implemented by the PYOORB propagator. The ephemeris generator will automatically map the propagated covariance matrices to the sky-plane. + +You will need to install adam-pyoorb in order to use the ephemeris generator. + +```sh +pip install adam-core[pyoorb] +``` + ```python import numpy as np from astropy import units as u from adam_core.orbits.query import query_horizons -from adam_core.propagator import PYOORB +from adam_core.propagator import PYOORBPropagator from adam_core.observers import Observers from adam_core.time import Timestamp @@ -203,7 +211,7 @@ object_ids = ["Duende", "Eros", "Ceres"] orbits = query_horizons(object_ids, initial_time) # Make sure PYOORB is ready -propagator = PYOORB() +propagator = PYOORBPropagator() # Define a set of observers and observation times times = Timestamp.from_mjd(initial_time.mjd() + np.arange(0, 100)) @@ -278,7 +286,7 @@ import numpy as np from astropy import units as u from adam_core.orbits.query import query_sbdb -from adam_core.propagator import PYOORB +from adam_core.propagator import PYOORBPropagator from adam_core.observers import Observers from adam_core.dynamics import generate_ephemeris_2body from adam_core.time import Timestamp @@ -288,7 +296,7 @@ object_ids = ["Duende", "Eros", "Ceres"] orbits = query_sbdb(object_ids) # Make sure PYOORB is ready -propagator = PYOORB() +propagator = PYOORBPropagator() # Define a set of observers and observation times times = Timestamp.from_mjd(np.arange(59000, 60000), scale="tdb") diff --git a/src/adam_core/orbit_determination/tests/test_differential_correction.py b/src/adam_core/orbit_determination/tests/test_differential_correction.py index 3281aa34..4167ad22 100644 --- a/src/adam_core/orbit_determination/tests/test_differential_correction.py +++ b/src/adam_core/orbit_determination/tests/test_differential_correction.py @@ -2,7 +2,7 @@ import pytest -from adam_core.propagator.adam_pyoorb import PYOORB +from adam_core.propagator.adam_pyoorb import PYOORBPropagator from ..differential_correction import fit_least_squares @@ -15,7 +15,7 @@ def test_fit_least_squares_pure_iod_orbit(pure_iod_orbit): # process using least squares orbit, orbit_members, observations = pure_iod_orbit - propagator = PYOORB() + propagator = PYOORBPropagator() fitted_orbit, fitted_orbit_members = fit_least_squares( orbit, observations, propagator diff --git a/src/adam_core/orbit_determination/tests/test_evaluate.py b/src/adam_core/orbit_determination/tests/test_evaluate.py index 91257024..f6c335d7 100644 --- a/src/adam_core/orbit_determination/tests/test_evaluate.py +++ b/src/adam_core/orbit_determination/tests/test_evaluate.py @@ -5,7 +5,7 @@ import pytest import quivr as qv -from adam_core.propagator.adam_pyoorb import PYOORB +from adam_core.propagator.adam_pyoorb import PYOORBPropagator from ..evaluate import evaluate_orbits @@ -17,7 +17,7 @@ def test_evaluate_orbits(pure_iod_orbit): # Test that evaluate_orbit correctly calculates residuals and other # parameters for an input orbit orbit, orbit_members, observations = pure_iod_orbit - propagator = PYOORB() + propagator = PYOORBPropagator() # Concatenate the orbit three times to test we can handle multiple orbits orbits = qv.concatenate([orbit, orbit, orbit]) @@ -64,7 +64,7 @@ def test_evaluate_orbits_outliers(pure_iod_orbit): # Test that evaluate_orbit correctly calculates residuals and other # parameters for an input orbit with outliers defined orbit, orbit_members, observations = pure_iod_orbit - propagator = PYOORB() + propagator = PYOORBPropagator() # Lets remove the last two observations outliers = observations.id.tolist()[-2:] diff --git a/src/adam_core/propagator/__init__.py b/src/adam_core/propagator/__init__.py index bd1ab456..5eed8299 100644 --- a/src/adam_core/propagator/__init__.py +++ b/src/adam_core/propagator/__init__.py @@ -7,5 +7,4 @@ "EphemerisMixin", "OrbitType", "EphemerisType", - "PYOORB", ]