simu.lib.context module

Section author: ECLAIRs GP team

Context is a high-level facade to centralize information and functionality on the ECLAIRs instrument required for the simulation, like:

  • instrument geometry

  • detector effect

  • position and attitude of ECLAIRs

  • earth in FOV

  • range energy

  • time exposure

As this is information needed by many models we use the singleton design pattern to share it.

Summary

Classes:

ContextSimulator

Defines a general simulation context for ECLAIRs observations

GlobalContextSimulator

Create global simulation context.

Observable

Designe pattern observer

class ContextSimulator[source]

Bases: simu.lib.context.Observable

Defines a general simulation context for ECLAIRs observations

property duration
earth_frac()[source]
property earth_limb
property earth_pos_fov_unit
property eclairs_attitude
property energy_range
property idx_chan
is_in_fov()[source]
open_fov_map()[source]
property pos_sat
set_duration(duration)[source]
Parameters

duration (float) – simulation time in s

set_idx_chan(idx_chan)[source]

Set energy channel index

Parameters

idx_chan (int) – energy channel index

set_mdl_effect(mdl_effect)[source]
Parameters

mdl_effect

set_pos_sat(pos)[source]
Parameters

pos (array 3 float) – satellite position in km in GCRS frame

set_quaternion_svom(quater)[source]

..note :: proposal: add switch to allow the user to choose between specifying a quaternion or an attitude. Or split functions.

set_sim_geom(sim_pts)[source]
Parameters

sim_pts

set_t_start(t_start)[source]
Parameters

t_start (float) – start time of the simulated observation in s from mjdref

property t_start
class GlobalContextSimulator(*args, **kargs)[source]

Bases: simu.lib.context.ContextSimulator

Create global simulation context.

instance = None
reset_all()[source]
reset_detec_effect()[source]
reset_observer()[source]
class Observable[source]

Bases: object

Designe pattern observer

add_observer(observer)[source]
Parameters

observer

del_observer(observer)[source]
Parameters

observer

notify_observer()[source]