pytmosph3r.planetary_system.observer

Module Contents

class Observer(latitude: float | astropy.units.Quantity[pytmosph3r.util.pt.angle] = None, longitude: float | astropy.units.Quantity[pytmosph3r.util.pt.angle] = None, orbit=None, **kwargs)[source]

Bases: 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 (latitude, 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 Rays and should probably not be used independently.

Set the observer’s position with:

Parameters:
  • latitude (float, Unit, optional) – Latitude (in \(rad\) or astropy units). Default to 0.

  • longitude (float, Unit, optional) – Longitude (in \(rad\) or astropy units). Default to $pi$.

property coordinates

Tuple (latitude, longitude).

property orbit
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 CartesianCoordinateSystem using its spherical coordinates ( latitude, longitude).

latitude

Latitude coordinate of the ending point of the unit vector (in radians).

longitude

Longitude coordinate of the ending point of the unit vector (in radians).

build(model=None)[source]

Link to model, and set default values if not set before.

add_ray_origin(altitude, angle)[source]

Function to add the origin point of a ray, i.e., its intersection with the terminator using its polar coordinates (altitude, angle), to the Cartesian coordinate system cartesian_system.

This function is used for each ray in Rays.compute_sub_rays.

Parameters:
  • altitude (float) – altitude (m) of the origin point

  • angle (float) – angle (radians) of the origin point

position_from_time(time, orbit=None)[source]

Update the position of the observer based on the time (in \(seconds\)) and the orbit.

position_from_phase(phase, orbit=None)[source]

Update position of the observer based on the phase (in \(rad\)) and the orbit.