
# Author: Tamas Gal <tgal@km3net.de>
# License: BSD-3

import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")


filename = "data/km3net_jul13_90m_muatm50T655.km3_v5r1.JTE_r2356.root.0-499.h5"

hits = pd.read_hdf(filename, 'hits', mode='r')
hits.hist("tot", bins=254, log=True, edgecolor='none')
plt.title("ToT distribution")
plt.xlabel("ToT [ns]")


# Author: Tamas Gal <tgal@km3net.de>
# License: BSD-3

import tables as tb
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")


filename = "data/km3net_jul13_90m_muatm50T655.km3_v5r1.JTE_r2356.root.0-499.h5"

with tb.File(filename) as f:
    tots = f.get_node("/hits/tot")[:]

plt.hist(tots, bins=254, log=True, edgecolor='none')
plt.title("ToT distribution")
plt.xlabel("ToT [ns]")

Fix for new km3hdf5 version 4
Fix for new km3hdf5 version 4

  
  # Author: Tamas Gal <tgal@km3net.de>
  # License: BSD-3
  
- import pandas as pd
+ import tables as tb
  import matplotlib.pyplot as plt
  import km3pipe.style
  km3pipe.style.use("km3pipe")
  
  
  filename = "data/km3net_jul13_90m_muatm50T655.km3_v5r1.JTE_r2356.root.0-499.h5"
  
- hits = pd.read_hdf(filename, 'hits', mode='r')
+ with tb.File(filename) as f:
+     tots = f.get_node("/hits/tot")[:]
+ 
- hits.hist("tot", bins=254, log=True, edgecolor='none')
+ plt.hist(tots, bins=254, log=True, edgecolor='none')
  plt.title("ToT distribution")
  plt.xlabel("ToT [ns]")
  
Fix for new km3hdf5 version 4
## Code Before:

# Author: Tamas Gal <tgal@km3net.de>
# License: BSD-3

import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")


filename = "data/km3net_jul13_90m_muatm50T655.km3_v5r1.JTE_r2356.root.0-499.h5"

hits = pd.read_hdf(filename, 'hits', mode='r')
hits.hist("tot", bins=254, log=True, edgecolor='none')
plt.title("ToT distribution")
plt.xlabel("ToT [ns]")

## Instruction:
Fix for new km3hdf5 version 4
## Code After:

# Author: Tamas Gal <tgal@km3net.de>
# License: BSD-3

import tables as tb
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")


filename = "data/km3net_jul13_90m_muatm50T655.km3_v5r1.JTE_r2356.root.0-499.h5"

with tb.File(filename) as f:
    tots = f.get_node("/hits/tot")[:]

plt.hist(tots, bins=254, log=True, edgecolor='none')
plt.title("ToT distribution")
plt.xlabel("ToT [ns]")
