:py:mod:`pytmosph3r.planetary_system.observer` ============================================== .. py:module:: pytmosph3r.planetary_system.observer Module Contents --------------- .. py:class:: Observer(latitude: Union[float, astropy.units.Quantity[pytmosph3r.util.pt.angle]] = None, longitude: Union[float, astropy.units.Quantity[pytmosph3r.util.pt.angle]] = None, orbit=None, **kwargs) Bases: :py:obj:`pytmosph3r.log.Logger` Defines the position of the observer using a unit vector. The starting point of the vector is the center of the planet. The ending point is located at the coordinate (:py:attr:`latitude`, :py:attr:`longitude`) on the unit sphere. Astropy's units are supported. Floats are considered to be in SI units. WARNING: This class has been extracted from :class:`~.rays.Rays` and should probably not be used independently. Set the observer's position with: :param latitude: Latitude (in :math:`rad` or astropy units). Default to 0. :type latitude: float, Unit, optional :param longitude: Longitude (in :math:`rad` or astropy units). Default to $\pi$. :type longitude: float, Unit, optional .. py:property:: coordinates Tuple (latitude, longitude). .. py:property:: orbit .. py:property:: cartesian_system Cartesian coordinate system (x,y,z) of which: - z is oriented along the rotation axis (pointing towards the North Pole) - x points towards a reference point on the equator that corresponds to a longitude equal to zero - y is chosen to have a direct basis. The coordinates of the unit vector defining the direction of the rays are then computed through :class:`~pytmosph3r.util.geometry.CartesianCoordinateSystem` using its spherical coordinates ( :py:attr:`latitude`, :py:attr:`longitude`). .. py:attribute:: latitude Latitude coordinate of the ending point of the unit vector (in radians). .. py:attribute:: longitude Longitude coordinate of the ending point of the unit vector (in radians). .. py:method:: build(model=None) Link to model, and set default values if not set before. .. py:method:: add_ray_origin(altitude, angle) Function to add the origin point of a ray, i.e., its intersection with the terminator using its polar coordinates (:py:attr:`altitude`, :py:attr:`angle`), to the Cartesian coordinate system :py:attr:`cartesian_system`. This function is used for each ray in :class:`Rays.compute_sub_rays`. :param altitude: altitude (`m`) of the origin point :type altitude: float :param angle: angle (`radians`) of the origin point :type angle: float .. py:method:: position_from_time(time, orbit=None) Update the position of the observer based on the time (in :math:`seconds`) and the orbit. .. py:method:: position_from_phase(phase, orbit=None) Update position of the observer based on the phase (in :math:`rad`) and the orbit.