GeometryEvent module#

GeometryEvent module.

class gfinder.geometryevent.GeoEvtFile(geoevt_file=None)[source]#

Bases: object

read(geoevt_file=None)[source]#
write(geoevt, geoevt_file=None)[source]#
class gfinder.geometryevent.GeometryEvent(opportunity_definition=None, geoevt_dict=None, time_window=None, start_time=None, stop_time=None, format='')[source]#

Bases: gfinder.event.Event

Class representing a geometry event.

A GeometryEvent is an Event that can contains and handle Geometry objects. Objects inheriting the GeometryEvent class knows how to construct their associated geometries.

Depending of its type, a GeometryEvent object can hold children GeometryEvent objects.

A GeometryEvent object can be of 3 types, which have a hierarchical relationship:

  • sequence: contains Observation(s)

  • observation: contain Measurements

  • measurement

geoevt_class#

name of the GeometryEvent class.

Type

str

n_geometries#

number of Geometry objects associated to the geometry event.

Type

int

geometries#

list of Geometry objects associated to the geometry event.

Type

list

n_sub_events#

number of sub-GeometryEvent objects.

Type

int

sub_events#

list of GeometryEvent objects.

Type

list

parent_event#

parent GeometryEvent class name (Sequence or Measurement).

Type

str

index#

index of this GeometryEvent object wrt its parent object.

Type

int

valid#

validity flag.

Type

bool

Constructs GeometryEvent object.

Parameters
add_sub_event(sub_geoevt)[source]#

Add a sub-GeometryEvent object to this GeometryEvent object.

For example:

  • A Sequence object is made of Observation objects.

  • An Observation object is made of Measurement objects.

Parameters

sub_geoevt (GeometryEvent) – sub-GeometryEvent object to be added.

compute_geometries(searchable_only=False)[source]#

Compute geometry data associated to each Geometry object.

get_csv_header()[source]#
get_csv_line(event_name='EVENT', subgroup='', group='', geometries=None)[source]#
get_dict()[source]#

Returns this GeometryEvent dictionary.

get_geometries(scalar_only=False, searchable_only=False)[source]#
get_geometry(name)[source]#

Returns the Geometry object for a given input class name.

Parameters

name (str) – name of input Geometry class.

get_geometry_data(name)[source]#

Returns the Geometry object data for a given input class name.

Parameters

name – name of input Geometry class.

get_geometry_dicts()[source]#

Returns the list of Geometry dictionary.

get_geometry_names(parent_class=None)[source]#

Returns the names of the Geometry objects associated to this GeometryEvent, optionally filtered by parent class name.

Parameters

parent_class (str) – name of the parent class.

get_geometry_parameters(name)[source]#

Returns parameters for a given Geometry object class name.

Parameters

name – name of input Geometry class.

Returns

dict

get_searchable_geometries()[source]#

Returns associated Geometry objects that are searchable.

get_sub_event_dicts()[source]#

Returns the list of sub-GeometryEvent objects dictionary.

get_sub_events_geometries(name)[source]#

Returns the list of Geometry objects held by this GeometryEvent object sub-events.

For example, the following call shall return the Dwell_Time(Geometry) objects:

Observation.get_sub_events_geometries(‘Dwell_Time’)

Parameters

name (str) – name of the input Geometry class to return Geometry objects for.

get_sub_events_geometry_data(name)[source]#

Returns the list of Geometry objects data held by this GeometryEvent object sub-events.

For example, the following call shall return the Dwell_Time(Geometry) objects data:

Observation.get_sub_events_geometry_data(‘Dwell_Time’)

Parameters

name (str) – name of the input Geometry class to return Geometry objects data for.

get_sub_events_reference_times(format='et', mission_event=None)[source]#

Returns the list of reference times associated to this GeometryEvent sub-events.

For example, the following call returns the reference ephemeris times corresponding to Measurement objects.

Observation.get_sub_events_reference_times()

Parameters
  • format (str) – time format, et (default), utc or rel (requires mission Event object).

  • mission_event (Event) – mission Event object (required to derive relative time).

has_geometry(name)[source]#

Returns whether or not this GeometryEvent contains a Geometry object given by its class name.

Parameters

name (str) – input Geometry class name.

is_valid()[source]#
class gfinder.geometryevent.Measurement(opportunity_definition=None, geoevt_dict=None, start_time=None)[source]#

Bases: gfinder.geometryevent.GeometryEvent

Class that represents an observation measurement.

Constructs Measurement object.

Parameters
compute(searchable_only=False)[source]#
class gfinder.geometryevent.Observation(opportunity_definition=None, geoevt_dict=None, start_time=None, stop_time=None, n_steps=None, time_step=None, format='')[source]#

Bases: gfinder.geometryevent.GeometryEvent

Class that represents an observation.

Constructs Observation object.

Parameters
  • opportunity_definition

  • geoevt_dict

  • start_time

  • stop_time

  • n_steps

  • time_step

  • format

compute(searchable_only=False)[source]#

Compute Geometry objects data associated to each Measurement object, and to this Observation object.

get_measurement_geometry_names(parent_class=None)[source]#

Returns the list of Geometry class names associated to this Observation’s Measurement objects.

Parameters

parent_class (str) – name of the parent class name.

get_measurements()[source]#

Returns the list of Measurement objects associated to this Observation object.

get_measurements_geometries(name)[source]#

Returns the list of Geometry objects associated to this Observation’s Measurement objects.

Parameters

name (str) – name of the input Geometry class to return Geometry objects for.

get_measurements_geometry_data(name)[source]#

Returns the list of Geometry objects data associated to this Observation’s Measurement objects.

Parameters

name (str) – name of the input Geometry class to return Geometry objects data for.

get_measurements_times(format='et', mission_event=None)[source]#

Returns the list of reference times associated to this Observation’s Measurement objects.

Parameters
  • format (str) – time format, et (default), utc or rel (requires mission Event object).

  • mission_event (Event) – mission Event object (required to derive relative time).

class gfinder.geometryevent.Sequence(opportunity_definition=None, geoevt_dict=None, time_window=None, n_steps=None, time_step=None)[source]#

Bases: gfinder.geometryevent.GeometryEvent

Class that represents a sequence of observations.

Constructs Sequence object.

Parameters
add_observation(geoevt_dict)[source]#

Add Observation object to this Sequence object.

Parameters

geoevt_dict (dict) – observation dictionary, passed from Opportunity.loadSequence().

compute(searchable_only=False)[source]#

Compute Geometry objects data associated to each Observation object, and to this Sequence object.

get_observations(searchable_only=False)[source]#

Returns the list of Observation objects associated to this Sequence object.

get_observations_geometry_data(name)[source]#

Returns the list of Geometry objects data associated to this Sequence’s Observation objects.

Parameters

name (str) – name of the input Geometry class to return Geometry objects data for.

get_observations_times(format=None, mission_event=None)[source]#

Returns the list of reference times associated to this Sequence’s Observation objects.

Parameters
  • format (str) – time format, et (default), utc or rel (requires mission Event object).

  • mission_event (Event) – mission Event object (required to derive relative time).