giant.utilities

This package provides a few different utility routines for interfacing with external data and general data analysis.

The modules in this package each contain detailed information about what they provide/do and a summary of all of the functionality available from the modules in this package is provided below.

Summary Contents

Modules

outlier_identifier

This module provides a function for calculating outliers in a 1 dimensional data set using Median Absolute Deviation.

spice_interface

This module provides utility functions and classes for quickly creating callable objects to NAIF spice functions as well as a function to convert a datetime object to spice ephemeris time without using spice itself.

stereophotoclinometry

This module provides a number of classes for interfacing with files used in the Stereophotoclinometry (SPC) software suite for performing shape modelling and surface feature navigation.

random_combination

Provides an iterator for generating unique random combinations from a population where order doesn't matter.

tee

This module provides 2 classes for performing tees of outputs to a file.

Classes

Summary

This class is used to read/write from the SPC summary (.SUM) files.

Nominal

This class is used to read/write from the SPC Nominal (.NOM) files.

Image

This class is used to read and write from SPC Image files (.DAT).

Regress

This class is used to read from SPC regress files.

ShapeModel

This class is used to read and write from SPC Shape files (Implicitly connected Quadrilateral, ICQ format).

Maplet

This class is used to read and write from SPC Maplet files.

Landmark

This class is used to read and write from SPC Landmark files.

RandomCombinations

Iterate over number_of_combos random combinations of combo_length from population.

REDIRECT

An enumeration specifying the options of what to redirect

Tee

This class support simultaneously writing to a file and stdout/stderr

DoubleTee

This class provides the ability to simultaneously tee both STDOUT and STDERR to a file.

Functions

get_outliers

This function can be used to identify outliers in a 1 dimensional set of data.

leap_seconds

This function returns the number of leap seconds between observation_date and January 1, 12:00:00.000 (TDB).

datetime_to_et

This function converts a python datetime object to ephemeris time correcting for leap seconds

create_callable_position

This function generates a partial function of the spkpos method from spice with the target, frame, abcorr, and observer inputs already set (so that the only remaining input is the ephemeris time).

create_callable_state

This function generates a partial function of the spkezr method from spice with the target, frame, abcorr, and observer inputs already set (so that the only remaining input is the ephemeris time).

create_callable_orientation

This function generates a partial function of the pxform function from spice with the from and the to frames specified.

et_callable_to_datetime_callable

This function takes a callable object that takes a time in ephemeris time and returns a callable object that takes a time as a python datetime object.

get_distortion

This function gets the distortion value from the lithos file pertaining to a specified image

Constants

spice_interface.HAS_SPICE

This flag specifies whether spiceypy is available in the current python environment

spice_interface.J2000_EPOCH

The UTC Epoch for spice ephemeris time

spice_interface.LEAP_SECONDS_LIST

A numpy datetime64 array of leap seconds taken from naif0012.tls

stereophotoclinometry.DATE_FMT

This is the observation_date format used in SPC summary and nominal files.