-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
81 lines (56 loc) · 2.29 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Acquisition scripts for taking data from Keysight scopes
========================================================
Installation
------------
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:
```console
$ virtualenv ~/acquisition
$ source ~/acquisition/bin/activate
$ pip install numpy h5py matplotlib pyvisa
```
And then you just need to remember to run
```console
$ source ~/acquisition/bin/activate
```
before running any of the scripts.
Taking Data
-----------
To take data, run:
```console
$ ./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:
```console
$ ./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.
Analyzing the Data
------------------
To integrate the waveforms taken with the acquisition script, just run:
```console
$ ./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:
```console
$ ./analyze-waveforms [input filename] -o [output filename] --plot --sodium
```
for sodium runs. Or:
```console
$ ./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.
Loading Settings From a Previous Run
------------------------------------
You can load data from a previous run with the command:
```console
$ ./load-settings [output filename]
```