Opportunity module#

Opportunity module.

class gfinder.opportunity.Opportunity(mission_scenario, opportunity_definition, time_inputs, binning=1, sim_sc_att=False, sim_scanner=False, dict=None)[source]#

Bases: object

Class that represent a calculation of opportunity times and/or geometry.

compute(searchable_only=False)[source]#
cross_validate(ck_file)[source]#

Cross validate MOS and AGM simulated pointings.

Used by PTR Exporter class.

export(format, obs_idx=None, path='', overwrite=False, agm_validation=None)[source]#
getGeometryNames(geoevt_class_name)[source]#
getMeasurementsGeoJSON(geometry_name, observation_id=1, surface_only=False, split=False)[source]#
getMissionEvent()[source]#
get_dict()[source]#
get_no_comp_times(t_int, binning=None, margin=None, observation_id=1, format='rel')[source]#

Returns times at which no scanner motion compensation is required.

Parameters
  • t_int

  • binning

  • margin

  • observation_id

  • format

Returns:

get_observation()[source]#
get_observation_geometry(name, obs_idx=0)[source]#
get_observations()[source]#
get_opportunities()[source]#
isValid()[source]#
loadSequence(geoevents_dict)[source]#
search()[source]#
setID(opportunity_id)[source]#
summary(depth=2)[source]#
class gfinder.opportunity.OpportunityDefinition(odf_file, target=None, binning=None, majis_scan_angle=None, sc_slew_angles=None, datastore=None, replace_defvar=True, **kwargs)[source]#

Bases: object

Class representing an opportunity definition.

odf_file#
Type

str

name#
Type

str

description#
Type

str

observation_type#
Type

str

target#
Type

str

observer#
Type

str

detector#
Type

str

geometry_defs_dict#
Type

dict

searchable_geometry_defs#
Type

list

valid#
Type

bool

Constructor method.

Parameters
  • odf_file

  • target

  • binning

  • majis_scan_angle

  • sc_slew_angles

  • datastore

check_geometry_def(in_geometry_def, datastore=None, geoevt_class='Measurement')[source]#
getDict()[source]#
getGeometryDefinitions(geoevt_class, searchable=False)[source]#
get_geometry_definition(geometry_name)[source]#
get_name()[source]#
get_pointing_odf()[source]#
get_target()[source]#
has_conditions()[source]#
majis_detector_name(detector_name, binning)[source]#

Returns the valid MAJIS SPICE detector name corresponding to input detector name and binning value.

replace_defvar(geometry_def_dict)[source]#
set(odf_file, target=None, binning=None, datastore=None, **kwargs)[source]#
to_json()[source]#
update_geometry_def(geometry_def)[source]#
class gfinder.opportunity.OpportunityFile(filepath=None)[source]#

Bases: object

read(filepath=None)[source]#
write(opportunity, file=None)[source]#
class gfinder.opportunity.TimeInputs(time_inputs_dict, opportunity=None, mission_scenario=None)[source]#

Bases: object

Class that represents time inputs required for computation (search or simulation).

A TimeInputs object is used to initiate an Opportunity object.

opportunity_id#

opportunity identifier

event_id#

mission event identifier

start_time#

start time

stop_time#

stop time

time_step#

computation time step in seconds

n_steps#

number of computation steps

Type

int

input_event#

Event object corresponding to time inputs

Type

Event

mission_event#

Mission Event object

Type

Event

valid#
Type

bool

Inits TimeInputs object.

Parameters
  • time_inputs_dict

  • opportunity

  • mission_scenario

derive_event(opportunity=None, mission_scenario=None)[source]#

Derive Event object associated with time inputs.

if opportunity_id is provided, search result time window is used. It has precedence over all other following inputs.

if no event_id is provided:

  • if start_time and stop_time (in UTC) -> used to create event object.

  • if only start_time -> time_step and n_steps are used to derived stop_time.

    • if no start_time and stop_time -> kernels coverage start_time and stop_time are used.

if event_id is provided:

  • if no start_time and stop_time -> event_id, start_time and stop_time are used (duration must be different than 0).

  • if start_time and stop_time -> start_time and stop_time (in relative time) are used with event_id reference time.

    • if only start_time -> time_step and n_steps are used to derived stop_time.

get_dict()[source]#
get_event()[source]#

Returns Event object corresponding to time inputs.

get_time_window()[source]#

Returns SPICE Time Window corresponding to time inputs.