RTC Real Time Code rtc2

rtc2 is the c-extension module that implements the real-time control engine. This engine does the real-time reconstructor calculations and communicates to the AO wavefront sensor, tip/tilt sensor, woofer DM, and tweeter DM.

The operating modes of the control engine are purposely made simple, as are the data structures it deals with, so that it can be concentrated on performing only the time-critical AO functions. This puts the burden of controller definition, consistency checking, calibration operations, user interface, etc. on the supervisory python code module rtc and the parameter file set.

For the most part, the “user” does not need to know much about the rtc2 extension module methods, as all interfaces to it are through the rtc python module.

For further details about the DM and camera drivers, see low-level drivers.

init()

initialize the names, pointers, and (maximum) sizes in the data and parameter dictionaries then allocate the memory for each

all data space is preallocated at this init step so provide room for the largest case

param_list()

list all the data and parameter names, pointers, and sizes

hello_world()

make sure the rtc2 module is imported and responding

get_state()

return the state of the controller

set_state(state)

set the state of the controller (0: exit, 1: go, 2: pause)

set_sizes(tuple)

set various scalar parameters that are associated with sizes of objects

set_verbosity(vebosity_level)

sets how much verbiage feedback should spew out to the terminal when rtc2 methods are executed. Default of 0 means quiet.

load(parameterName, parameterArray)

load the given parameter array into the memory slot allocated for it in the c-extension module.

iload(parameterName, parameterArray)

same as load, but for integer arrays like the de-interlace maps

peek(parameterName)

returns a python array whose data entry points into the c-extension memory at the allocated location. This gives the python interface module rtc direct access to the real-time memory region