To install everything you need access to the python libraries: numpy, h5py, matplotlib, and pyvisa. To install these globally you can ask your system administrator, or you can install them in a local virtual environment like:
$ virtualenv ~/acquisition
$ source ~/acquisition/bin/activate
$ pip install numpy h5py matplotlib pyvisa
And then you just need to remember to run
$ source ~/acquisition/bin/activate
before running any of the scripts.
To take data, run:
$ ./acquire-waveforms --ip [ip address of scope] -n [number of events] -o [output filename]
This will save the waveforms for all visible channels in the output file in the HDF5 format.
The scope settings after each acquisition are returned to the values they had
before you ran the script. In addition, the settings are stored with the output
file each time you run the script. If you want to reload the settings from a
previous run you can pass the --settings
argument like:
$ ./acquire-waveforms --ip [ip address of scope] -n [number of events] --settings [previous output filename]
which will load the settings from that run before taking data.
To integrate the waveforms taken with the acquisition script, just run:
$ ./analyze-waveforms [input filename] -o [output filename] --plot
The output file is a ROOT file which contains histograms of the charge for each channel in the input file. Passing the --plot argument is optional and when passed will open the various fits and plots when the script is finished running.
To fit the resulting histograms produced by the analysis script, run either:
$ ./analyze-waveforms [input filename] -o [output filename] --plot --sodium
for sodium runs. Or:
$ ./analyze-waveforms [input filename] -o [output filename] --plot --laser
for laser runs. Again, the plot argument is optional and will open up the various fits.
You can load data from a previous run with the command:
$ ./load-settings [output filename]