.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_tot_histogram.py: ================== ToT histogram. ================== Create a simple histogram of the PMT signals (ToTs) in all events. .. image:: /auto_examples/images/sphx_glr_plot_tot_histogram_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Loading style definitions from '/home/docs/checkouts/readthedocs.org/user_builds/km3pipe/conda/stable/lib/python3.5/site-packages/km3pipe/kp-data/stylelib/km3pipe.mplstyle' | .. code-block:: python from __future__ import absolute_import, print_function, division # Author: Tamas Gal # License: BSD-3 import tables as tb import matplotlib.pyplot as plt import km3pipe.style km3pipe.style.use("km3pipe") filename = "data/atmospheric_muons_sample.h5" with tb.File(filename) as f: tots = f.get_node("/hits/tot")[:] plt.hist(tots, bins=max(tots), log=True, edgecolor='none') plt.title("ToT distribution") plt.xlabel("ToT [ns]") **Total running time of the script:** ( 0 minutes 1.632 seconds) .. _sphx_glr_download_auto_examples_plot_tot_histogram.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_tot_histogram.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_tot_histogram.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_