IAP GITLAB

Skip to content
Snippets Groups Projects
Commit e1e9abb3 authored by Alan Coleman's avatar Alan Coleman
Browse files

correct binning

parent 669c48af
No related branches found
No related tags found
1 merge request!604"Need for writing first interaction information"
This commit is part of merge request !604. Comments created here will be created in the context of that merge request.
......@@ -32,7 +32,9 @@ def plot_avg_profile(dat, part, ax):
nshower = len(dat.shower.unique()) # number of showers in output dir
max_dX = np.max(dat["X"])
h = np.histogram(
dat.X, bins=np.linspace(0, max_dX, 200), weights=dat[part] * 1 / float(nshower)
dat.X,
bins=np.linspace(0, max_dX, len(dat["X"]) - 1),
weights=dat[part] * 1 / float(nshower),
)
ax.plot(h[1][:-1], h[0], label=part)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment