Compress TCS data stream into a few values diagnostic of tracking errors¶
Note work in progress. I have attached comma separated files with TCS information described below for (almost) all exposures from Nov. 1, 2012 to Feb. 13, 2013. (( csv.tgz )). Running ~sispi/reil/TCS/tcs_summary.py will fill in missing data in ~sispi/reil/TCS/csv/*.csv
TCS database [*mysql*].¶
The telescope telemetry is dumped to a database once per hour and is stored in binary format. Note the need to make sure endianess is correct. A simple python script allows the extraction of binary data given a start and stop time (rio_mysql_read.py). Note that this is for the position telemetry (there is also a velocity table).
The position telemetry has ten columns described by the following matlab code.
%cRIO Telemetry HA=(:,1) DEC=(:,2)
demp=a(:,[1 3]);%Kernel Position Demmand Input [deg]
demv=a(:,[2 4]);%Kernel Velocity Demmand Input [deg/sec]
dem_out=a(:,[5:6]);%cRIOP Velocity Demmand Output to cRIOV [deg/sec]
pos=a(:,[7:8]);%Tape Encoder Position [deg]
pabs=a(:,[9:10]);%Absolute Encoder Position [deg]
Note: ~sispi/reil/TCS/tcs_summary.py replaces rio_mysql_read.py
DES Database information [*pyscobd2*]¶
The expid, start time and exptime is made for a given nights exposures. Can easily add requests for QR values, etc. postgres server.
Existing code (in development).¶
On SISPI machines, cd ~sispi/reil/TCS
Currently, gets a list of all expid, mjd and exptime for all exposures on the given day (or range of days). Then, for each expid, downloads the TCS position and TCS velocity tables for that exposures.
Next, the code will process the information in the TCS tables and write a file NNNNN.tcs_summary.txt with a summary for each expid=NNNNNN. Currently, however, it writes the tcs data (and a few other variables) to a gzip compressed pickle with filename NNNNNN.tcsdata.gz. The data for the position table is stored in a position (pdata) 10xM scipy ndarray (10 variables x M 0.01 second samples) and 18xM velocity (vdata) table.
Examples can be found in ~sispi/reil/TCS/*.tcsdata.gz.
Code in development.¶Code (python based) is being developed to
- Analyze and summarize the TCS (100Hz) data for each expid.
For each exposure taken each night, the TCS information is extracted. If enabled, a PDF file is created that shows the first 90 seconds (and prior 5 seconds) of each exposure. From, each exposure, the following values are extracted from the data and written in a comma separated (CSV) file.
- The mean and rms of hour angle error (difference between requested and actual)
- The mean and rms of declination error (difference between requested and actual)
- The mean and rms of hour angle error for the 5 seconds prior to the exposure (p5)
- The mean and rms of declination error for the 5 seconds prior to the exposure (p5)
- The mean and rms of hour angle error for the first 2 seconds of the exposure (f2)
- The mean and rms of declination error for the first 2 seconds of the exposure (f2)
- The mean and rms of hour angle error for the first 30 seconds of the exposure (f30)
- The mean and rms of declination error for the first 30 seconds of the exposure (f30)
- The mean and rms of hour angle error for the second 30 seconds of the exposure (s30)
- The mean and rms of declination error for the second 30 seconds of the exposure (s30)
- The mean and rms of hour angle error for the third 30 seconds of the exposure (t30)
- The mean and rms of declination error for the third 30 seconds of the exposure (t30)
The following keys are available in the nightly CSV file (examples attached). expid, dec_mean, dec_mean_f2, dec_mean_f30, dec_mean_p5, dec_mean_s30, dec_mean_t30, dec_std, dec_std_f2, dec_std_f30, dec_std_p5, dec_std_s30, dec_std_t30, exptime, ha_mean, ha_mean_f2, ha_mean_f30, ha_mean_p5, ha_mean_s30, ha_mean_t30, ha_std, ha_std_f2, ha_std_f30, ha_std_p5, ha_std_s30, ha_std_t30, mjd, Combined with the above information, the keys should be self explanatory. expid is the DES exposure id. exptime is the length of the exposure and mjd is the modified julian date of the exposure.
Examining the first 2 seconds of the exposure should let us know is the telescope has settled prior to shutter open. Especially if compared to the 5 seconds prior to shutter opening.
Examining, for example, the first 30 seconds vs the third 30 seconds (seconds 60-90) should inform us of the improved tracking provided by the guide loop. Looking at the most recent data, Feb 9, 2013 it is clear from that the first 30 seconds prior to the guider being enabled has much better performance in declination than when the guider is active (seconds 60-90).
What is clear, however, is that dramatic improvements, especially in hour angle performance has been made of the last sever months. Examine the following four images showing the RMS (stddev) performance in HA and dec for 4 nights spaced 1 month apart.