Added range for van Hove histogram

This commit is contained in:
Sebastian Kloth 2023-12-13 13:49:47 +01:00
parent 43ac510e7d
commit e91defdc7a

View File

@ -263,8 +263,7 @@ def van_hove_self(
delta_r = np.abs(vectors[:, 2]) delta_r = np.abs(vectors[:, 2])
else: else:
raise ValueError('Parameter axis has to be ether "all", "x", "y", or "z"!') raise ValueError('Parameter axis has to be ether "all", "x", "y", or "z"!')
hist = np.histogram(delta_r, bins, range=(bins[0], bins[-1]))[0]
hist = np.histogram(delta_r, bins)[0]
r = (bins[1:] + bins[:-1]) / 2 r = (bins[1:] + bins[:-1]) / 2
return r, hist / len(start_frame) return r, hist / len(start_frame)