We describe two ways to get DIMM, or by extension any LBT telemetry, data:
  • with on-the-fly plot GUI called LBTplot
  • by retrieving text files.
More information on seeing and the DIMM can be found there:

http://wiki.lbto.org/bin/view/Commissioning/WhatIsTheSeeing

http://wiki.lbto.org/bin/view/Operators/DIMMOperatingProcedureAndManuals

LBTplot GUI

- log in a lbto machine, e.g. LBTO@obs3, see also UsefulLoginInfo.

- called in a terminal

LBTplot.py 

which is an alias to

/home/lbcobs/supportscripts/ObserverSupport/LBTplot.py

Comments from John Hill on LBTplot

(from an email on the 2013-03-05)

Click the button to display the plot you want. WARNING: Some
plots will fail during the daytime - e.g. when there is no guiding
data or no DIMM data.

The plots coming from tcslog are:

TT Offload - plots tip-tilt-focus offloads from the adaptive
shell to the M2 hexapod on both sides.
HO Offload - plots high order (Z5-Z6-Z7-Z8) offloads from
the adaptive shell to the primary mirror on both sides.
SX guide - plots FWHM, ellipticity, magnitude, and guide
corrections for the Left off-axis guide star.
DX guide - plots FWHM, ellipticity, magnitude, and guide
corrections for the Right off-axis guide star.
both guide - plots FWHM, ellipticity, magnitude, and guide
corrections for both off-axis guide stars (2 colors).
guide xy - plots guide corrections for both off-axis guide
stars in an x-y plane.
LBC guide - plots guide corrections for both LBC guiders. :

The plots from telemetry are:

DIMM - plots the raw DIMM seeing at the elevation the DIMM
is observing, and the seeing value corrected to zenith.
(The TO usually has this one on the left ENV display.)
Temp - plots telescope steel, air and glass temperatures
along with weather station ambient.
SX M2 TT - plots secondary mirror tip-tilt positions on the
Left side.
DX M2 TT - plots secondary mirror tip-tilt positions on the
Right side.
SX M2 xyz - plots secondary mirror X-Y-Z positions on the
Left side.
DX M2 xyz - plots secondary mirror X-Y-Z positions on the
Right side. :


Default settings are to plot data for the last hour, and to refresh
the plot every 60 seconds. Command line flags are available to set
the lookback time and the refresh interval.
   lbcobs@obs1 ~/supportscripts/ObserverSupport$ ./LBTplot.py -h
 


Example: ./LBTplot.py -b -12.0 (makes a plot of the last 12 hours)
command line arguments for plotting
-b TIME or --backhour TIME lookback time in hours (default -1)
-r TIME or --refresh TIME refresh interval in seconds (default 60)
-h or --help print this help message

The plot window is resizable by dragging the corner. The plots are
generated at 1500x1000 pixels and then rescaled to fit your window.

The GUI is safe for multiple users on the same or different
workstations. You can safely run multiple copies of the GUI making
different plots, but multiple copies as one user making the same plot
could get you in trouble (crashing the plotting scripts).

Retrieving a text file

In order to save some telemetry data to text files for further use, one way is to call the underlying python/IDL routine of LBTplot.py. We give here an example for the DIMM data.

cd /home/lbcobs/supportscripts/TelemetrySupport/

There you will find all the routines called by the LBTplot GUI (and maybe more).

To generate a text file (or an histogram or plot) for a particular date, one can call e.g. for the 18th December 2015 and for generating a text file only (no plot):

./dimmplot_hdfextract -d 20151218 -n

see also the help

lbto@obs3:4 % ./dimmplot_hdfextract.py --help
Example:  ./dimmplot_hdfextract.py  -b -12.0   (makes a plot of the last 12 hours)
general command line arguments for plotting
 -d YYYMMDD or --day YYYYMMDD date to plot (default today)
 -e TIME or --endhour TIME    end time in UT hours (default now)
 -b TIME or --backhour TIME   hours before end time (default 24)
 -x '[XMIN,XMAX]' or --xlimits '[XMIN,XMAX]' plot range (IDL style)
 -y '[YMIN,YMAX]' or --ylimits '[YMIN,YMAX]' plot range (IDL style)
 -s XX or --side XX           which mirror side to plot SX/DX
detailed arguments to control script behaviour
 -p or --plotonly             make plot but don't extract new telemetry
 -n or --nodisplay            extract new telemetry but don't plot
 -m or --mute                 don't display the plot with eog
 -r or --remove               remove temporary data files
 -o DIR or --outpath DIR      put plot files in this directory path
 -h or --help                 print this help message

As printed in the terminal, the files are being written in the /tmp/ directory from were you can retrieve them.

To read this text file in python, one can either use the same above routine (e.g. for plotting), or use this function
'''
    function to read DIMM text file data as retrieved by e.g.
        ./dimmplot_hdfextract -b 20151218 -n
    on LBTO machine in dir  /home/lbcobs/supportscripts/TelemetrySupport/
'''
import numpy as np
import astropy.io.ascii as asc
from astropy.time import Time

def read_DIMM_file(filename, return_table=False):
    dimm= asc.read(filename, format='csv')
    if return_table:
        return dimm
    else:
        mjd_time= np.array(Time(Time(dimm['time_stamp'],
                                     format='unix').mjd /1e6,
                                format='mjd').mjd)
        seeing= np.array(dimm['seeing'])

        return mjd_time, seeing

-- GillesOrban - 03 Feb 2016
Topic revision: r2 - 03 Feb 2016, GillesOrban
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding AOWiki? Send feedback