To aid in lock-loss studies, I made a new program called 'lookback', similar to 'getdata', to look at past data.
When called with channel name arguments, it runs continuously, storing all channel data in a ring buffer. When the user hits Ctrl-C, all the data in the ring buffer is displayed. There is an option to store the data in the ring buffer to disk as well.
controls@rosalba:/opt/rtcds/caltech/c1/scripts/general 0$ ./lookback -h
usage: lookback [-h] [-l LENGTH] [-o OUTDIR] channel [channel ...]
Lookback on testpoint data. The specified amount of data is stored in a ring
buffer. When Ctrl-C is hit, all data in the ring buffer is plotted. Both 'DQ'
and 'online' test point data is available. Use NDSSERVER environment variable
to specify host:port.
positional arguments:
channel Acquisition channel. Multiple channels may be
specified and acquired at once.
optional arguments:
-h, --help show this help message and exit
-l LENGTH, --lookback LENGTH
Lookback time in seconds. This amount of data will be
stored in a ring buffer, and plotted on Ctrl-C.
Default is 10 seconds
-o OUTDIR, --outdir OUTDIR
Output directory to write data (will be created if it
doesn't exist). Data from each channel stored as
'<channel>.txt'. Any existing data files will be
overwritten.
controls@rosalba:/opt/rtcds/caltech/c1/scripts/general 0$
|