- #1
huda
- 5
- 0
- TL;DR Summary
- I have energy spectrum of a single sample. I want to calculate and plot DOS. Since DOS is dN/dE number of states available in unit interval of energy . How I can calculate this unit interval? If I plot histogram and select bins of equal size, it doesn't give me unit interval.Data = np.array([-1.61032636, -1.23577245, -0.50587484, -0.28348457,
-0.18748945, 0.4537447, 1.2338455, 2.13535718])
Data = np.array([-1.61032636, -1.23577245, -0.50587484, -0.28348457, -0.18748945, 0.4537447, 1.2338455, 2.13535718])
print("Data is: ", Data)
print(Data.shape)
n,bins,patches = plt.hist(Data,bins=4)
print("n: ",n)
print("bins: ",bins)
plt.savefig("./DOS")
print("Data is: ", Data)
print(Data.shape)
n,bins,patches = plt.hist(Data,bins=4)
print("n: ",n)
print("bins: ",bins)
plt.savefig("./DOS")