From daee9b48ac6bbc42e1bd406dc4a1c138cb19d257 Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Thu, 9 Jun 2011 20:46:59 -0400 Subject: you can now take data using sequence mode! also, updated the README file to include more examples. sock.py now replaces scope.py. sock.py is almost identical, but i renamed the class to Socket and fixed it so that data headers are properly received; previously, it was assumed that the 8 byte header was sent in a single recv() call, which is not always the case. draw.py is a new script to draw waveforms using matplotlib instead of root. --- README | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 5 deletions(-) (limited to 'README') diff --git a/README b/README index a6f371b..6dbf283 100644 --- a/README +++ b/README @@ -1,14 +1,35 @@ -LeCrunch version 1.0 +LeCrunch version 1.1 ==================== Installation ------------ -You must have h5py, a general-purpose Python interface to the Hierarchical -Data Format Library version 5 installed. The source can be downloaded from -, or on an ubuntu distribution: +LeCrunch requires a python version >= 2.6 and the following python packages: -~$ sudo apt-get install python-h5py + numpy + The fundamental package needed for scientific computing with python. + On an ubuntu distribution: + + ~$ sudo apt-get install python-numpy + + h5py + A general-purpose Python interface to the Hierarchical Data Format + Library. The source can be downloaded from , + or on an ubuntu distribution: + + ~$ sudo apt-get install python-h5py + + matplotlib + A python 2D plotting library which produces publication quality figures + in a variety of hardcopy formats and interactive environments across + platforms; on an ubuntu distribution: + + ~$ sudo apt-get install python-matplotlib + +After downloading LeCrunch, you should first edit the file "config.py" and +set the variable "scope_ip" to the ip address of your oscilloscope. If you're +unsure of the ip address of your oscilloscope, just open up a web browser +on the oscilloscope and go to www.whatsmyip.org. Then just source the env.sh file in this directory, and you're good to go! @@ -28,6 +49,43 @@ The syntax to fetch waveforms: where is the name of the file you would like LeCrunch to store the extracted waveforms; waveforms are stored in the hdf5 file format. +Once you have fetched some waveforms you can plot an overlay with draw.py: + +~$ draw.py + +You can load and save the scope's configuration with config.py. Suppose you +took some data a month ago and saved it to the file "run001.hdf5". Then, to +restore the scope configuration as it was when you took that data, just run: + +~$ config.py load run001.hdf5 + +In order to send commands directly to the oscilloscope you can run the file +"sock.py" as a script: + +~$ sock.py "display?" +'DISP ON\n' + +~$ sock.py "sequence?" +'SEQ OFF,1000,25E+3 SAMPLE\n' + +~$ sock.py "seq on, 100" + +For a list of commands see the LeCroy Remote Control Manual. If you don't have +a copy, just google it. + +How to Transfer Waveforms at High Speed +--------------------------------------- + +Turn on sequence mode! + +~$ sock.py 'seq on, 1000' + +Be aware that as you turn up the number of segments the scope will take +longer to process a single acquisition. The default timeout value for the +socket connection in sock.py is set to 2 seconds; therefore, if an acquisition +takes longer than 2 seconds, the socket object will raise a timeout exception +when you request a waveform. + Documentation ------------- -- cgit