aboutsummaryrefslogtreecommitdiff
path: root/run_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_setup.py')
-rw-r--r--run_setup.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/run_setup.py b/run_setup.py
new file mode 100644
index 0000000..ff220e9
--- /dev/null
+++ b/run_setup.py
@@ -0,0 +1,33 @@
+"""
+This file contains dictionaries for defining attributes to attach to data
+files. Each dictionary should contain a 'file' and 'dataset' key whose values
+are dictionaries specifying attributes to attach to the root of the hdf5 file
+and each dataset in the file respectively. The values in these dictionaries
+should contain the type to convert the user's input to before storing them
+in the data file.
+
+Example:
+ >>> fetch.py test.hdf5 -c default
+ /
+ /docstring? new batch of pmts
+ /channel1
+ /channel1.pmtid? trig
+ /channel1.voltage? 800
+ /channel1.termination? 50.0
+ /channel2
+ /channel2.pmtid? ZN0103
+ /channel2.voltage? 1800.0
+ /channel2.termination? 50.0
+ ...
+ saving event: 1000
+ Completed 1000 events in 2.535 seconds.
+ Averaged 0.00253 seconds per acquisition.
+ Wrote to file 'test.hdf5'.
+"""
+
+import string
+
+default = { 'file' : { 'docstring' : str },
+ 'dataset' : { 'pmtid' : string.lower,
+ 'voltage' : float,
+ 'termination' : float } }