utilities

This module provides some basic utilities for working with the ray tracer in GIANT.

Use

In general you won’t use the utilities provided herein directly, as they are dispersed throughout the ray tracer in the areas where they are needed already. That being said, everything in here should be useable with clear documentation if you have some non-typical use.

Functions

compute_com

This function computes the center of mass assuming uniform density for a triangle tesselated surface.

compute_stats

Compute statistics on a shape tessellated using Triangles.

find_limbs

This helper function determines the limb points for any traceable shape (visible edge of the shape) that would be visible for an observer located at observer_position looking toward scan_center_dir along the directions given by scan_dirs.

ref_ellipse

This function finds the best fit ellipsoid to a set of vertices (minimizing the algebraic distance residuals).

to_block

This helper function takes a list of lists/arrays and puts them all into a single contiguous array

correct_light_time

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

correct_stellar_aberration

Correct for stellar aberration using rotations.

correct_stellar_aberration_fsp

Correct for stellar aberration using linear addition.

Constants

SPEED_OF_LIGHT

The speed of light in kilometers per second