System#
The System class.
The jitted/host helper functions that implement each integration branch live in sibling modules of this subpackage:
jorbit.system.ephem(generic integrate/ephem, leapfrog)jorbit.system.ias15_dense(IAS15interpolate=True)jorbit.system.keplerian(analytic two-body path)
- class jorbit.system.system.System(particles=None, state=None, gravity='default solar system', de_ephemeris_version='440', integrator='ias15', earliest_time=<Time object: scale='utc' format='iso' value=1980-01-01 00:00:00.000>, latest_time=<Time object: scale='utc' format='iso' value=2050-01-01 00:00:00.000>, max_step_size=None)[source]#
Bases:
objectA system of particles in the solar system.
Very similar in spirit to the Particle class, but now for multiple massless particles.
- Parameters:
particles (list | None)
state (SystemState | None)
gravity (str | Callable)
de_ephemeris_version (str | None)
integrator (str)
earliest_time (Time)
latest_time (Time)
max_step_size (u.Quantity | None)
- ephemeris(times, observer, step_scheduler='prs23', return_steps=False)[source]#
Compute an ephemeris for the system.
- Parameters:
times (
Time|Array) – The times to compute the ephemeris for. Can be a single time or an array of times. If provided as a jnp.array, the entries are assumed to be in TDB JD.observer (
str|Array) – The observer to compute the ephemeris for. Can be a string representing an observatory name, or a 3D position vector in AU. For more info on acceptable strings, see the get_observer_positions function.step_scheduler (
str) – The scheduler to use for determining step sizes. Choices are “prs23”, which uses the PRS23 controller from Pham+ 2023, or “global”, which uses the controller from the original IAS15 paper. Default is “prs23”. Ignored for leapfrog integrators and keplerian systems.return_steps (
bool) – If True, return a tuple of the SkyCoord and the total number of integration steps taken (summed across any stitched interpolation chunks).Nonefor the analytic Keplerian and fixed-step leapfrog paths, which cannot truncate. Defaults to False.
- Returns:
The ephemeris of each particle in the system at the given times, in ICRS coordinates and as seen from that specific observer. Each particle has its own light travel time correction applied individually. If return_steps is True, returns
(coords, steps).- Return type:
SkyCoord
- integrate(times, step_scheduler='prs23', return_steps=False)[source]#
Integrate the System to a given time.
Note: This method does not change the state of the system. It returns the positions and velocities at the given times, but the system itself is not changed.
- Parameters:
times (
Time) – The times to integrate to. Can be a single time or an array of times. If provided as a jnp.array, the entries are assumed to be in TDB JD.step_scheduler (
str) – The scheduler to use for determining step sizes. Choices are “prs23”, which uses the PRS23 controller from Pham+ 2023, or “global”, which uses the controller from the original IAS15 paper. Default is “prs23”. Ignored for leapfrog integrators and keplerian systems.return_steps (
bool) – If True, also return the total number of integration steps taken (summed across any stitched interpolation chunks), appended as the final element of the returned tuple.Nonefor the analytic Keplerian and fixed-step leapfrog paths, which cannot truncate. Defaults to False.
- Returns:
The positions of the particle at the given times, in AU, and the The velocities of the particle at the given times, in AU/day. If return_steps is True, also the total integration step count.
- Return type:
tuple[Array,Array]
- property t_ref: astropy.time.core.Time#
Reference time (astropy Time, TDB) — the System’s epoch.
All JAX-visible times inside the System are offsets in days from this reference, which keeps the integrator’s internal arithmetic well-conditioned at decadal timescales.
- property t_ref_jd: float#
Reference time as a float JD (TDB), matching
t_ref.