Skip to content

Instantly share code, notes, and snippets.

@alexrudy
Last active November 4, 2015 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexrudy/2b2d97d94009cdb21bd0 to your computer and use it in GitHub Desktop.
Save alexrudy/2b2d97d94009cdb21bd0 to your computer and use it in GitHub Desktop.
Telemetry for ShaneAO Documentation

Telemetry recorder tools.

The interface for the telemetry recorder is only available in the ShaneAO command line interface for now. Please use the box next to the >>> symbol in ShaneAO to enter telemetry commands.

The telemetry recorder will:

  • Only record closed loop telemetry when the system appears settled.
  • Only start once the user calls telemetry.start().
  • Won't record additional telemetry if disk space appears low.
  • Will stop recording at 6am local time each morning, pending another user initiated telemetry.start() command.

This is implemented in unreal/py/modules/telemetry.py

For Operators

To run the telemetry recorder script in the background, use the following:

>>> telemetry.start()

At the end of the night, run:

>>> telemetry.stop()

To see the status of the telemetry recorder, use:

>>> telemetry.status()

If there is ever a problem, and you'd like to immediately stop the script, use:

>>> telemetry.stop(block=False)

At the start of the night, please use record open loop telemetry. The telescope should be pointed at a relatively bright star (one used for calibration is fine) but with the AO loops open. Then you can call:

>>> telemetry.openloop()

Configuring the Telemetry Recorder

The telemetry recorder is designed to with a few configurable keywords, which can be adjusted through telemetry.configure:

>>> telemetry.configure(ndumps=10, interval=5)

Arguments to telemetry.configure are:

  • `ndumps`: The number of consecutive telemetry datasets to record at a time. (Default: 5)
  • `interval`: The interavel, in minutes, between telemetry data recording. (Default: 15)
  • `settled`: Either True or False. When True, it requires that the AO system think that the loop is "settled" when starting to record telemetry. (Default: True)
  • `max_datasets`: The maximum number of telmetry datasets to record in a single session. (Default: 128)

For Engineers

This module provides telemetry recording tools for a multi-threaded environemnt where telemetry recording happens in the background.

The telemetry recorder is an object which maintains two threads, a timing thread and a recording thread. The recording thread maintains a single telemetry recording session, and can be invoked from other threads to properly start and save telemtry data. The timing thread triggers recording of telemetry data continuously in the background. Interfacing with both threads is done through the TelemetryRecorder thread.

To use the telemetry recorder:

>>> telemetry = TelemetryRecorder()
>>> telemetry
<TelemetryRecorder ndumps=1 interval=1 0/100 stopped>
>>> telemetry.start()

The telemetry recorder uses the parameters interval and ndumps to control the timer. These two parameters control how many telemetry dumps (ndumps) to take every interval minutes. These parameters can be adjusted with the configure method, or with the constructor for TelemetryRecorder:

>>> telemetry.configure(ndumps=2, interval=15)

To record a block of telemetry on demand, use the record method:

>>> telemetry.record()

or call the TelemetryRecorder instance itself:

>>> telemetry()

When calling the instance iteslf, you can record a number of sequential blocks, and you can set a timeout for each record in seconds.:

>>> telemetry(n=5, timeout=40.0)

Background telemetry recording can be paused and resumed at any time:

>>> telemetry.pause()
>>> telemetry.resume()

The settled keyword controls whether the recorder requires the loop to be settled in order to write telemetry data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment