#telescope #astronomy

yanked dos-actors

Giant Magellan Telescope Dynamic Optical Simulation Actor Model

2.1.1 Sep 13, 2022
2.1.0 Sep 9, 2022
1.0.3 Aug 31, 2022
0.1.22 Aug 17, 2022
0.1.8 May 31, 2022

#67 in #telescope

Download history 1/week @ 2023-07-31 30/week @ 2023-08-14 30/week @ 2023-08-21 30/week @ 2023-08-28 30/week @ 2023-09-04 2/week @ 2023-09-25 10/week @ 2023-10-23 50/week @ 2023-10-30

60 downloads per month

MIT license


Giant Magellan Telescope Dynamic Optical Simulation Actor Model


GMT Dynamic Optics Simulation Actors

The GMT DOS [Actor]s are the building blocks of the GMT DOS integrated model. Each [Actor] has 3 properties:

  1. input objects
  2. output objects
  3. client


input objects are a collection of inputs and output objects are a collection of outputs. An actor must have at least either 1 input or 1 output. A pair of input/output is linked with a channel where the input is the receiver and the output is the sender. The same output may be linked to several inputs. channels are used to synchronize the [Actor]s.

Each [Actor] performs the same task, within an infinite loop, consisting of 3 operations:

  1. receiving the inputs if any
  2. updating the client state
  3. sending the outputs if any

The loop exits when one of the following error happens: ActorError::NoData, ActorError::DropSend, ActorError::DropRecv.

Sampling rates

All the inputs of an [Actor] are collected are the same rate NI, and all the outputs are distributed at the same rate NO, however both inputs and outputs rates may be different. The inputs rate NI is inherited from the rate NO of outputs that the data is collected from i.e. (next actor)::NI=(current actor)::NO.

The rates NI or NO are defined as the ratio between the simulation sampling frequency [Hz] and the actor inputs or outputs sampling frequency [Hz], it must be an integer ≥ 1. If NI>NO, outputs are upsampled with a simple sample-and-hold for NI/NO samples. If NO>NI, outputs are decimated by a factor NO/NI

For a 1000Hz simulation sampling frequency, the following table gives some examples of inputs/outputs sampling frequencies and rate:

Inputs [Hz] Ouputs [Hz] NI NO Upsampling Decimation
1000 1000 1 1 - 1
1000 100 1 10 - 10
100 1000 10 1 10 -
500 100 2 10 - 5
100 500 10 2 5 -


A client must be assigned to an [Actor] and the client must implement some of the following traits:

  • write if the actor has some outputs,
  • read if the actor has some inputs,
  • update, this trait must always be implemented (but the default empty implementation is acceptable)


An integrated model is build as follows:

  1. select and instanciate the [clients]
  2. assign [clients] to [actor]s
  3. add outputs to the [Actor]s and connect them to inputs of other [Actor]s
  4. build a [model]
  5. Check, run and wait for the Model completion

For more detailed explanations and examples, check the [actor] and [model] modules.


The crates provides a minimal set of default functionalities that can be augmented by selecting appropriate features at compile time:


~321K SLoC