poliastro.ephem
¶
Module Contents¶
Classes¶
Interpolation methods to sample the ephemerides. |
|
Time history of position and velocity of some object at particular epochs. |
Functions¶
|
Interpolates ephemerides data |
|
|
|
|
|
Interpolates x, sampled at “s” instants, at “u” instants. |
|
-
poliastro.ephem.
EPHEM_FORMAT
= Ephemerides at {num} epochs from {start} ({start_scale}) to {end} ({end_scale})¶
-
class
poliastro.ephem.
InterpolationMethods
¶ Bases:
enum.Enum
Interpolation methods to sample the ephemerides.
-
SINC
¶
-
SPLINES
¶
-
-
poliastro.ephem.
build_ephem_interpolant
(body, period, t_span, rtol=1e-05)¶ Interpolates ephemerides data
-
poliastro.ephem.
_interpolate_splines
(epochs, reference_epochs, coordinates, *, kind='cubic')¶
-
poliastro.ephem.
_interpolate_sinc
(epochs, reference_epochs, coordinates)¶
-
poliastro.ephem.
_sinc_interp
(x, s, u)¶ Interpolates x, sampled at “s” instants, at “u” instants.
-
poliastro.ephem.
_INTERPOLATION_MAPPING
¶
-
poliastro.ephem.
_get_destination_frame
(attractor, plane, epochs)¶
-
class
poliastro.ephem.
Ephem
(coordinates, epochs, plane)¶ Time history of position and velocity of some object at particular epochs.
Instead of creating Ephem objects directly, you are encouraged to use the available classmethods.
- Parameters
coordinates (astropy.coordinates.CartesianRepresentation) – Coordinates with velocities.
epochs (astropy.time.Time) – Epochs corresponding to the coordinates.
plane (Planes) – Reference plane of the coordinates.
-
__str__
(self)¶ Return str(self).
-
__repr__
(self)¶ Return repr(self).
-
property
epochs
(self)¶ Epochs at which the ephemerides was originally sampled.
-
property
plane
(self)¶ Reference plane of the ephemerides.
-
classmethod
from_body
(cls, body, epochs, *, attractor=None, plane=Planes.EARTH_EQUATOR)¶ Return Ephem for a SolarSystemPlanet at certain epochs.
- Parameters
body (SolarSystemPlanet) – Body.
epochs (Time) – Epochs to sample the body positions.
attractor (SolarSystemPlanet, optional) – Body to use as central location, if not given the Solar System Barycenter will be used.
plane (Planes, optional) – Fundamental plane of the frame, default to Earth Equator.
-
classmethod
from_horizons
(cls, name, epochs, *, attractor=None, plane=Planes.EARTH_EQUATOR, id_type='smallbody')¶ Return Ephem for an object using JPLHorizons module of Astroquery.
- Parameters
name (string) – Name of the body to query for.
epochs (Time) – Epochs to sample the body positions.
attractor (SolarSystemPlanet, optional) – Body to use as central location, if not given the Solar System Barycenter will be used.
plane (Planes, optional) – Fundamental plane of the frame, default to Earth Equator.
id_type (string, optional) – Use “smallbody” for Asteroids and Comets (default), and “majorbody” for Planets and Satellites.
-
classmethod
from_orbit
(cls, orbit, epochs, plane=Planes.EARTH_EQUATOR)¶ Return ‘Ephem` from an Orbit at certain epochs. :param orbit: Orbit. :type orbit: ~poliastro.twobody.orbit.Orbit :param epochs: Epochs to sample the orbit positions. :type epochs: ~astropy.time.Time :param plane: Fundamental plane of the frame, default to Earth Equator. :type plane: ~poliastro.frames.Planes, optional
-
sample
(self, epochs=None, *, method=InterpolationMethods.SPLINES, **kwargs)¶ Returns coordinates at specified epochs.
- Parameters
epochs (Time, optional) – Epochs to sample the ephemerides, if not given the original one from the object will be used.
method (InterpolationMethods, optional) – Interpolation method to use for epochs outside of the original ones, default to splines.
- Returns
Sampled coordinates with velocities.
- Return type
CartesianRepresentation