topsim.user.telescope.Telescope
- class topsim.user.telescope.Telescope(env, config, planner, scheduler)[source]
The Telescope is a high-level abstraction of the Telescope and Telesopce Operations Centre/Monitor. It coordinates between the Scheduler to determine if the Cluster and the Buffer have capacity.
- Parameters:
env (Simpy.Environment object) – The simulation environment
config (core.config.Config object) – Config object with stored simulation configuration
planner (core.planner.Planner object) – The Planner actor for the current simulation
scheduler (core.scheduler.Scheduler object) – The Scheduler actor for the current simulation
- Raises:
OSError – This will be raised if we cannot read the Telescope config file.
JSONDecodeError – This will be raised if the config is not parseable JSON
Attributes
nametotal_arraysTotal number of arrays used to observe
pipelinespipeline` pairs
schedulerSchedulerobject of SimulationplannerPlannerobject of SimulationMethods
__init__(env, config, planner, scheduler)begin_observation(observation)Update the telescope use status based on observation demand for antennas
finish_observation(observation)Update the telescope use status based on observation demand for antennas
has_observations_to_process()is_idle()Check if telescope has current or pending observations
make_delay_conscious_decision()This method takes into account delays on the telescope and acts to improve the science output based on the delays This will change based on whether we are in a Global or Independent DAG model.
make_greedy_decision()This method acts as a 'greedy' decision maker, with the following policies:
observations_finished()Calculates the number of observations that are finished observing
observations_waiting()Calculate the number of observations that are waiting for telescope time
print_state()run()The entry point for the Telescope actor; this will make decisions per timestep and then once these decisions have been resolved, yield a timeout to indicate a single timestep has passed for the Telescope.
run_observation_on_telescope(demand)to_df()Produce a pandas.DataFrame of output for the Simulation
Monitor.