correct_light_time

giant.ray_tracer.scene:

giant.ray_tracer.scene.correct_light_time(target_location_inertial, camera_location_inertial, time)[source]

Correct an inertial position to include the time of flight for light to travel between the target and the camera.

This function iteratively calculates the time of flight of light between a target and a camera and then returns the relative vector between the camera and the target accounting for light time (the apparent relative vector) in inertial space. This is done by passing a callable object for target location which accepts a python datetime object and returns the inertial location of the target at that time (this is usually a function wrapped around a call to spice).

Note that this assumes that the units for the input are all in kilometers. If they are not you will get unexpected results.

Parameters:
  • target_location_inertial (Callable[[<module 'datetime' from '/Users/aliounis/mambaforge/envs/giant_public/lib/python3.11/datetime.py'>], ndarray]) – A callable object which inputs a python datetime object and outputs the inertial location of the target at the given time

  • camera_location_inertial (ndarray) – The location of the camera in inertial space at the time the image was captured

  • time (datetime) – The time the image was captured

Returns:

The apparent vector from the target to the camera in inertial space

Return type:

ndarray