@@ -12,17 +12,17 @@ Callbacks on address 11 contain all the data items, and the NDArray
1212dimensions are [11, NumAverage_RBV] for each NDArray callback.
1313
1414This is the medm screen for the HDF5 plugin used with the TetrAMM.
15- The TetrAMM is configured with ValuesPerRead=5, so it is sending data at 20 kHz.
15+ The TetrAMM is configured with ValuesPerRead=5, so it is sending data at 20 kHz.
1616AveragingTime is set to 0.1 seconds, so NumAverage_RBV is 2000.
1717
1818.. figure :: HDF5_stream.png
1919 :align: center
2020
2121|
2222
23- The Array address in the plugin is set to 11, so it is receiving all 11 data items.
23+ The Array address in the plugin is set to 11, so it is receiving all 11 data items.
2424FileWriteMode is set to Stream, so it will stream the NDArrays to the HDF5 file
25- as they arrive. NumCapture is set to 200, so it will collect 200 arrays, each with
25+ as they arrive. NumCapture is set to 200, so it will collect 200 arrays, each with
26260.1 second of data giving a total of 20 seconds saved to disk.
2727Pressing the Start button starts the streaming.
2828
@@ -52,7 +52,7 @@ This is the result of the Linux h5dump --contents on that file
5252 }
5353 }
5454
55- The streamed data is in dataset /entry/data/data.
55+ The streamed data is in dataset /entry/data/data.
5656This is the output of h5dump --header, looking at just that dataset.
5757::
5858
@@ -87,11 +87,11 @@ In HDF5 convention the last array index is the fastest varying.
8787
8888Saving all 11 data items is somewhat wastefull, since everything else can be calculated from just
8989the 4 currents, which are the first 4 items in the arrays.
90- We can save disk space by only saving the currents by using an ROI plugin between the
90+ We can save disk space by only saving the currents by using an ROI plugin between the
9191quadEM driver and the HDF5 plugin.
9292
9393This is the medm screen for an ROI plugin which gets its data on address 11 from the TetrAMM port.
94- It is configured with a start of 0 and size of 4 on the first array dimension, and so will
94+ It is configured with a start of 0 and size of 4 on the first array dimension, and so will
9595select only the 4 currents. The second dimension is set to auto size = Yes, so it will automatically
9696select all elements in the second dimension, even if NumAverage_RBV changes.
9797
@@ -161,16 +161,30 @@ This is the output when the program is compiled and run:
161161 IDL> .go
162162 DATA DOUBLE = Array[11, 2000, 200]
163163
164- This is the time-series plot. The data are highly periodic because the photodiodes were illuminated
164+ This is the time-series plot. The data are highly periodic because the photodiodes were illuminated
165165by fluorescent lights.
166166
167167.. figure :: IDL_HDF5_time_plot.png
168168 :align: center
169169
170- |
171170
172171This is the frequency plot. The peaks are almost exclusively 60 Hz and its odd and even harmonics.
173172The odd harmonics are ~10-100 times less than 60 Hz, and the even harmonics are ~100-1000 times less than 60 Hz.
174173
175174.. figure :: IDL_HDF5_frequency_plot.png
176175 :align: center
176+
177+
178+ Using Python, the data processing would be nearly identical, but with a few differences due to array and FFT conventions:
179+
180+ .. literalinclude :: process_hdf5.py
181+
182+ This will make a time-series plot of:
183+
184+ .. figure :: Py_HDF5_time_plot.png
185+ :align: center
186+
187+ and a frequency plot of:
188+
189+ .. figure :: Py_HDF5_frequency_plot.png
190+ :align: center
0 commit comments