aboutsummaryrefslogtreecommitdiff
path: root/tests/gen-ev-test.py
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-09 12:01:43 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:45 +0200
commitfbef32528d3b4b2b2f694aa16d60c53511b1d402 (patch)
tree73fce3701cfc50f2a519fcb0a62de9e9db5f4be7 /tests/gen-ev-test.py
parente19507ae14b5b9456d6c3379b43ba1ad1b2cc527 (diff)
Add wavelength and electron_voltage, plus units, to geometry file
Diffstat (limited to 'tests/gen-ev-test.py')
-rw-r--r--tests/gen-ev-test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/gen-ev-test.py b/tests/gen-ev-test.py
index 7300f604..e3cb9924 100644
--- a/tests/gen-ev-test.py
+++ b/tests/gen-ev-test.py
@@ -32,3 +32,17 @@ array = numpy.zeros((1,1), dtype=float)
with h5py.File('tests/ev_enum3.h5', 'w') as fh:
fh.create_dataset('/data/data_array', data=array)
+
+array = numpy.zeros((2,2), dtype=float)
+with h5py.File('tests/wavelength_geom.h5', 'w') as fh:
+ fh.create_dataset('/data/data_array', data=array)
+ dh = fh.create_dataset('/LCLS/photon_energy', (), 'f')
+ dh[()] = 9000.0
+ dh = fh.create_dataset('/LCLS/photon_energyK', (), 'f')
+ dh[()] = 9.0
+ dh = fh.create_dataset('/LCLS/electron_energy', (), 'f')
+ dh[()] = 300000
+ dh = fh.create_dataset('/LCLS/electron_energy2', (), 'f')
+ dh[()] = 300
+ dh = fh.create_dataset('/LCLS/wavelength', (), 'f')
+ dh[()] = 1e-10