forked from rmarabini/scipionboxBenchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhisto.py
More file actions
52 lines (42 loc) · 1.17 KB
/
Copy pathhisto.py
File metadata and controls
52 lines (42 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import collections
import glob
import os
import time
d = collections.OrderedDict()
searchedfile = glob.glob("GRID_0?/DATA/Images-Disc?/GridSquare_*/Data/*_frames*.mrc")
#searchedfile = glob.glob("20160930_CSM_AdDELTA7/GRID_0?/DATA/Images-Disc?/GridSquare_*/Data/*_frames*.mrc")
files = sorted( searchedfile, key = lambda file: os.path.getctime(file))
previousT = 0
x=[]
y=[]
counter = 0
for file in files:
T = os.path.getctime(file)
interval = T - previousT
print file, interval
previousT = T
x.append(counter)
y.append(interval)
counter += 1
#print x, y
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager as font_manager
#t = np.arange(0.0, 2.0, 0.01)
#s = 1 + np.sin(2*np.pi*t)
f = plt.figure()
plt.semilogy(x, y, linewidth=2.5)
plt.xlabel('Movie #')
plt.ylabel('Creation Time (sec)')
plt.title('Movie Production Interval')
plt.grid(True)
plt.savefig("test.png")
plt.savefig("test.pdf")
plt.show()
#histogram
#n, bins, patches = plt.hist(y, 50, normed=1, facecolor='green', alpha=0.75)
plt.hist(y, bins=5)
plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
plt.show()