The telemetry recorder/server (TRS) records all the WFC parameters and the WFC output quantities for every frame, except the raw pixel data which is available decimated to 100 Hz. This page describes how this data can be accessed.
Reference and documentation for TRS
TRS for Operations
- There is a UNIX command to check how much TRS disk space has been filled: checktrsDiskSpace.
- The AO keyword TRSREC is used to turn telemetry recording on and off:
- TRSREC=0: Nothing is logged
- TRSREC=1: WFC configuration is logged
- TRSREC=7: WFC configuration and all telemetry is logged.
TRSREC should never be set to 0! You can use MAORI → WFC to switch TRSREC between 1 (OFF) and 7 (ON).
- TRS recording does not need to be on in order to access TRS data. The aoacq widget turns TRS recording on whenever a star is acquired. So TRS is basically on all night. End of night script turns it off.
- One of the requirements for the AO system was that it must be able to run properly even if the TRS is not working. The non-essential tools that rely on TRS recording are the following:
- Archiver in AO acquisition widget: aoacq
- Optimization (bandwidth) widget: bw_widget
- Seeing monitor: logseeing
- Atmospheric characterization GUI: atmogui
- Wavefront sensor camera display: rawimdisp
- Deformable mirror voltage command display: dmdisp
- DM temporal power spectrum display: wobble
Saving data to k1aoserver or k2aoserver
|
Often, we wish to save data to be analyzed either immediately and/or at a later time:
- Turn TRS recording ON
- cdn
- idl
- IDL> diagsetup or use bw_widget for residual wavefront data. The data is stored in the nightly directory.
To read and manipulate the data, do the following:
- IDL> restore, 'diag0.sav' or whatever the filename is
- IDL> help
- IDL> help, trsdata, /struct
For reference:
Examples and notes for TRS queries have been made available in ~k2obsao/trsScripts/. See also
the IDL tools that are querying, sorting and analysing the telemetry.
Often, you will want to write your own query to collect arbitrary data at an arbitrary time.
It is fairly straight forward to write your own query in IDL.
The syntax for the queries is
IDL> a=trsquery(timestamp,samples,table,columns,cond=">=")
e.g.,
IDL> a=trsquery(-1,100,'ffb','timestamp','offsetcentroids','dmcommand')
or
IDL> a=trsquery('2007-Oct-19T011:30:01.0',1,'dfb','timestamp','rawpixel')
There are two formats for the timestamps: one is an integer that represents the number of hundreds of nanoseconds since the start of the year, or something like that.
The other is a string containing the UTC date and time in ISO format. The command
IDL> b=trstimestamp(a.timestamp)
is used to convert from one timestamp format to another (e.g., 10^-7 seconds to a string).
Queries in recent past are cached and are obtained much faster than queries in the more distant past.
The tables are:
ffb |
dfb |
strap |
configuration |
nonrtc |
The columns for each table are listed below:
- ffb:
- buffertype, recordlength, timestamp, framecounter, subapintensity, offsetcentroid, residualwavefront, dmcommand, dmcommandsclipped, residualrms, conf_id, ttcommands,
ttstraingauge, ttcommandsclipped
- dfb:
- buffertype, recordlength, timestamp, framecounter, rawpixel, rawpixelsize
- strap:
- timestamp, framecounter, conf_id, apdcounts, dttcentroids, dttcommands, dttstraingauge, dttcommandsclipped
- configuration:
- conf_id, par_id, par_val
The residualwavefront column contains 352 elements, which represents the 352 rows of the output of the matrix multiplication between the reconstructor and the offset centroids.
The elements 0:348 are the residual "DM voltages", 349:350 are the residual tip-tilt (in arcsec) and 351 is the focus term, used for open loop focus offloading.
The nonrtc column is currently empty, but can be upgraded to include non-WFC parameters, such as the OBS state, certain DCS keywords or parameters that are not stored in the Microgate WFC, such as frame rate or filenames.
Saving the WFC configuration
|
The current WFC configuration can be saved using an IDL command, saveconfig.
IDL> saveconfig, 'strangeimages.cfg'
This command also saves non-WFC parameters as an IDL save file, strangeimages.sav. To read the configuration, use the IDL function readconfig:
IDL> config=readconfig('strangeimages.cfg')
IDL> help, config, /structure
The configuration, including the non-WFC parameters, can also be loaded at a later time using
IDL> loadconfig, 'strangeimages.cfg'
The TRS can be used to determine the internal state of the WFC, either now or at any time in the past.
For example, to determine whether the CLMP is closed now, do
IDL> trsdata=trsquery(-1,1,'ffb','timestamp')
IDL> PRINT, trsdata.timestamp
IDL> 109744732588147
IDL> a=trsquery("select conf_id from configuration where conf_id=ts2conf(109744732588147) ",/sqlstmt)
IDL> PRINT, a.config_id
IDL> 43777665
IDL> b=trsqueryconfig(196623,43777665)
Sometimes, this query will fail because of incorrect data type problems (I think). Please run the query again, and if it does not work then restart IDL and run the query again.
The parameter ID for the CLMP in the configuration table is 196623, as can be seen in the table below.
Parameter ID for the Configuration Table
subaperture_size | 65537 |
background | 65539 |
flat_field_image | 65541 |
min_sub_flux | 65543 |
centroid_arcsec | 65545 |
centroid_origin | 65547 |
avg_sub_flux | 65549 |
den_free_centroid | 65551 |
wfs_temp | 65553 |
wfs_program | 65555 |
wfs_repetition_n | 65557 |
wfs_bias | 65559 |
wfs_gain | 65561 |
wfs_filter | 65563 |
wfs_ascii_cmd | 65566 |
subaperture_nr | 65568 |
ccd_lut | 65570 |
raw_pixel_nr | 65572 |
dm_focus_modal | 65574 |
reconstruction_matrix | 131073 |
dm_servo_coeffs | 131075 |
dm_origin | 131077 |
dm_loop | 131079 |
dm_limit | 131081 |
dm_actuator_map | 131083 |
tt_sensor_input | 196609 |
dtt_offset | 196611 |
dtt_servo_coeffs | 196613 |
dtt_angular_offset | 196615 |
dtt_disturbance_data | 196617 |
dtt_disturbance | 196619 |
dtt_servo_loop | 196621 |
dtt_clmp_loop | 196623 |
dtt_clmp_rec_matrix | 196625 |
dtt_clmp_servo_coeffs | 196627 |
dtt_limit | 196629 |
strap_use | 262145 |
apd_avg_sub_flux | 262147 |
apd_den_free_centroid | 262149 |
apd_sky_background | 262151 |
apd_flux_threshold | 262153 |
apd_interaction_matrix | 262155 |
utt_offset | 327681 |
utt_servo_coeffs | 327683 |
utt_angular_offset | 327685 |
utt_disturbance_data | 327687 |
utt_disturbance | 327689 |
utt_servo_loop | 327691 |
utt_clmp_loop | 327693 |
utt_clmp_rec_matrix | 327695 |
utt_clmp_servo_coeffs | 327697 |
utt_limit | 327699 |
utt_rotation_angle | 327701 |
utt_fixed_act | 327703 |
avg_interval_cont | 393217 |
avg_interval_dem | 393220 |
debug_mgp | 458755 |
operating_mode | 458757 |
trs_recording | 458761 |
watchdog | 458765 |
chop_parameters | 524289 |
chop | 524291 |
chop_offset | 524293 |
.
|