boinor.ephem ============ .. py:module:: boinor.ephem .. autoapi-nested-parse:: calculate Ephemerides of objects Attributes ---------- .. autoapisummary:: boinor.ephem.EPHEM_FORMAT Classes ------- .. autoapisummary:: boinor.ephem.BaseInterpolator boinor.ephem.SincInterpolator boinor.ephem.SplineInterpolator boinor.ephem.Ephem Functions --------- .. autoapisummary:: boinor.ephem.build_ephem_interpolant Module Contents --------------- .. py:data:: EPHEM_FORMAT :value: 'Ephemerides at {num} epochs from {start} ({start_scale}) to {end} ({end_scale})' .. py:function:: build_ephem_interpolant(body, epochs, attractor=Earth) Interpolates ephemerides data. :param body: Source body. :type body: Body :param epochs: Array of time values, can be generated with boinor.util.time_range. :type epochs: ~astropy.time.Time :param attractor: Attractor, default to Earth. :type attractor: ~boinor.bodies.Body, optional :returns: **interpolant** -- Interpolant function that receives time increment in seconds since the initial epoch. :rtype: callable .. py:class:: BaseInterpolator Dummy interpolator, the correct one has to be set .. py:method:: interpolate(epochs, reference_epochs, coordinates) :abstractmethod: Dummy interpolation function, the correct one has to be set .. py:class:: SincInterpolator Whittaker-Shannon interpolator .. py:method:: interpolate(epochs, reference_epochs, coordinates) Interpolation function of the Whittaker-Shannon interpolator .. py:class:: SplineInterpolator(kind='cubic') spline interpolator, by default a cubic spline is used .. py:method:: interpolate(epochs, reference_epochs, coordinates) interpolation function of the spline interpolator (by default a cubic spline is used) .. py:class:: Ephem(coordinates, epochs, plane) Time history of position and velocity of some object at particular epochs. Instead of creating Ephem objects directly, use the available classmethods. :param coordinates: Coordinates with velocities. :type coordinates: astropy.coordinates.CartesianRepresentation :param epochs: Epochs corresponding to the coordinates. :type epochs: astropy.time.Time :param plane: Reference plane of the coordinates. :type plane: ~boinor.frames.Planes .. py:method:: __str__() .. py:method:: __repr__() .. py:property:: epochs Epochs at which the ephemerides was originally sampled. .. py:property:: coordinates Coordinates with velocitiy. .. py:property:: plane Reference plane of the ephemerides. .. py:method:: from_body(body, epochs, *, attractor=None, plane=Planes.EARTH_EQUATOR) :classmethod: Return `Ephem` for a `SolarSystemPlanet` at certain epochs. :param body: Body. :type body: ~boinor.bodies.SolarSystemPlanet :param epochs: Epochs to sample the body positions. :type epochs: ~astropy.time.Time :param attractor: Body to use as central location, if not given the Solar System Barycenter will be used. :type attractor: ~boinor.bodies.SolarSystemPlanet, optional :param plane: Fundamental plane of the frame, default to Earth Equator. :type plane: ~boinor.frames.Planes, optional .. py:method:: from_horizons(name, epochs, *, attractor=None, plane=Planes.EARTH_EQUATOR, id_type=None) :classmethod: Return `Ephem` for an object using JPLHorizons module of Astroquery. :param name: Name of the body to query for. :type name: str :param epochs: Epochs to sample the body positions. :type epochs: ~astropy.time.Time :param attractor: Body to use as central location, if not given the Solar System Barycenter will be used. :type attractor: ~boinor.bodies.SolarSystemPlanet, optional :param plane: Fundamental plane of the frame, default to Earth Equator. :type plane: ~boinor.frames.Planes, optional :param id_type: Use "smallbody" for Asteroids and Comets and None (default) to first search for Planets and Satellites. :type id_type: NoneType or str, optional .. py:method:: from_orbit(orbit, epochs, plane=Planes.EARTH_EQUATOR) :classmethod: Return `Ephem` from an `Orbit` at certain epochs. :param orbit: Orbit. :type orbit: ~boinor.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: ~boinor.frames.Planes, optional .. py:method:: sample(epochs=None, *, interpolator=SplineInterpolator()) Returns coordinates at specified epochs. :param epochs: Epochs to sample the ephemerides, if not given the original one from the object will be used. :type epochs: ~astropy.time.Time, optional :param interpolator: Interpolation method to use for epochs outside of the original ones, default to splines. :type interpolator: ~boinor.ephem.BaseInterpolator, optional :returns: Sampled coordinates with velocities. :rtype: CartesianRepresentation .. py:method:: rv(epochs=None, **kwargs) Position and velocity vectors at given epochs. :param epochs: Epochs to sample the ephemerides, default to now. :type epochs: ~astropy.time.Time, optional :param \*\*kwargs: Extra kwargs for interpolation method.