mirror of
https://gitlab.com/pimnelissen/entropic-spring.git
synced 2025-11-30 19:33:07 +01:00
move data save to beginning to avoid confusion
This commit is contained in:
4
I.py
4
I.py
@ -19,6 +19,8 @@ else:
|
||||
band = RubberBand(N, a=1)
|
||||
lengths[i] = band.length/band.a
|
||||
|
||||
np.save("data/lengths.npy", lengths)
|
||||
|
||||
# histogram
|
||||
bin_edges = np.arange(-N-1, N+1, 2)
|
||||
values, _ = np.histogram(lengths, bins=bin_edges)
|
||||
@ -64,5 +66,3 @@ plt.xlim(xlim)
|
||||
plt.xlabel("$L/a$")
|
||||
plt.ylabel("$\hat{P}(L)/P(L)$")
|
||||
plt.show()
|
||||
|
||||
np.save("data/lengths.npy", lengths)
|
||||
Reference in New Issue
Block a user