For many experiment, the analysis of the smalldata h5 files is not too computing intensive and the analysis team can benefit from the quick and iterative nature of the Jupyter notebooks framework over the more involved cube production.
In this section, a few template notebook for common experiments are discussed.
Common features
All templates will start with a section where the experiment and run can be defined. Make sure to comment out the example file line when actual data are to be analyzed.
Sets of alias in the h5 files are defined in the following cell. This makes it convenient to change the target variable for the entire workflow, without having to change the variable name in each cell. The variables to be used for filtering (typically i0, timing tool fit, ...) are also defined here.
# helper dict to find data in file dataDict = {'alias': 'path/in/the/h5', ... } filters = {} filters['alias_filt1'] = [low,high] filters['alias_filt2'] = [low,high] ... print('Filter selection:') for key,value in filters.items(): print('\t{} : {}'.format(key, value)) hist_bins = {key: 35 for key in filters.keys()}
Make sure to adapt the alias to the detectors names in your actual data. The object rr
(created from rr = tables.File(f).root
) in the workspace allows for easy tab-exploration of the content of the h5 file to figure out variable names.
The goodness of the filters be be evaluated in the next cell, where histograms of the variables are shown together with the selected boundaries..