System#
The System class and its supporting functions.
- class jorbit.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 | collections.abc.Callable)
de_ephemeris_version (str | None)
integrator (str)
earliest_time (astropy.time.core.Time)
latest_time (astropy.time.core.Time)
max_step_size (astropy.units.quantity.Quantity | None)
- ephemeris(times, observer, step_scheduler='prs23')[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.
- 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.
- Return type:
SkyCoord
- integrate(times, step_scheduler='prs23')[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.
- 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.
- 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.