giant.photometry.planning.DiscretizedTrajectory

class giant.photometry.planning.DiscretizedTrajectory(scene, camera_position_function, start_bound, stop_bound, step_size, target_index=None)[source]

Bases: object

This class is used to setup a span in which to query the photometry model over. When iterating over this class, the photometry model is placed in the correct geometry within the camera frame and points to the defined target for each time step.

This class should only be used to step through a photometry model by time.

If a target_index value is not provided by the user, then the camera will point to the first target defined in the photometry model’s scene.

Parameters:
  • scene (Scene) – A Scene in which to find trajectory parameters

  • camera_position_function (Callable) – a function that returns the position of the camera for an input datetime

  • start_bound (datetime) – A datetime object defining the beginning of the window over which the calculations are to be done (inclusive)

  • stop_bound (datetime) – A datetime object defining the end of the window over which the calculations are to be done (inclusive)

  • step_size (timedelta) – A timedelta object specifying how to discretize the trajectory.

  • target_index (int | None) – The index representing the body to point to during the trajectory in the scene objects defined in the photometry model

scene: Scene

A Photometry object containing the scene in which to calculate photometry

camera_position_function

a function that returns the position of the camera for an input datetime

target_index: int

The index representing the body to point to during the trajectory in the scene objects defined in the photometry model

start_bound: datetime

A datetime object defining the beginning of the window over which the calculations are to be done (inclusive)

stop_bound: datetime

A datetime object defining the end of the window over which the calculations are to be done (inclusive)

step_size: timedelta

A timedelta object defining the size of the steps to take when discretizing the trajectory

Summary of Methods

place_and_point_to_body

This method computes places the scene at the input date, changes the origin of the scene to the camera, and points the camera directly at the target at target_index.