Event module#

Event module.

class gfinder.event.Event(time_window=None, start_time=None, stop_time=None, format='', data=None, id='')[source]#

Bases: object

A class representing an event.

The Event class is a wrapper class around the SPICE Window type that is at the core of SPICE Geometry Finder sub-system. It simplify operations for setting and getting Event properties.

An Event (or Window) is made of one or several intervals, and an interval can be an instant.

time_window#

SPICE Window data type

Type

str

interval_times#

event intervals times, in ephemeris time (et)

Type

list

n_intervals#

number of time intervals within the event

Type

int

start_time#

start time of the event, in ephemeris time (et)

Type

float

stop_time#

start time of the event, in ephemeris time (et)

Type

float

duration#

duration of the event, in seconds

Type

float

reference_time#

time at equal time from start and end times, in ephemeris time (et)

Type

float

Inits Event object.

Parameters
get_dict()[source]#
get_duration(format=None)[source]#
get_interval_times(format='et', mission_event=None)[source]#
get_reference_time(format='et', mission_event=None)[source]#
get_start_time(format='et', mission_event=None)[source]#
get_stop_time(format='et', mission_event=None)[source]#
get_time_window()[source]#
set_interval_times(interval_times, format='et')[source]#
set_time_window(time_window)[source]#
set_times(start_time, stop_time, format='et')[source]#
summary()[source]#
to_seconds(rel_time_str)[source]#

Convert an input string representation of a relative time to seconds.

For example:

12:10:01.510 -> 43801.51
-03:56:12    -> -14172.0
Parameters

rel_time_str (str) – string representating of a relative time

Returns

relative time in seconds

Return type

float

to_string(rel_time)[source]#

Convert an a relative time in seconds to a string representation.

For example:

43801.51 ->  12:10:01.510
-14172.2 -> -03:56:12.200
Parameters

rel_time (float) – relative time in seconds

Returns

string representating of a relative time

Return type

str