-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_scopes.py
48 lines (43 loc) · 2.66 KB
/
search_scopes.py
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
import matplotlib.pyplot as plt
import acquire
import process
shots = [1150521031, 1150522030, 1150522031, 1150522032, 1150522034, 1150527022,
1150527023, 1150527024, 1150527025, 1150527027, 1150527028, 1150527029,
1150527030, 1150528002, 1150528003, 1150528004, 1150528005, 1150528006,
1150528007, 1150528008, 1150528009, 1150528010, 1150528011, 1150528012,
1150528013, 1150528014, 1150528015, 1150528016, 1150528017, 1150528018,
1150528019, 1150528020, 1150528021, 1150528022, 1150528023, 1150528024,
1150529001, 1150529002, 1150529003, 1150529004, 1150529005, 1150529021,
1150529022, 1150529023, 1150529024, 1150529025, 1150529026, 1150529027,
1150529028, 1150602001, 1150610003, 1150610004, 1150610005, 1150610006,
1150610007, 1150610008, 1150610009, 1150610010, 1150610011, 1150610012,
1150610013, 1150610014, 1150610015, 1150611003, 1150611004, 1150611016,
1150611017, 1150611018, 1150611019, 1150611020, 1150611021, 1150611022,
1150611023, 1150611024, 1150611025, 1150612001, 1150612010, 1150612011,
1150612012, 1150612013, 1150612014, 1150612019, 1150612032, 1150612033,
1150612034, 1150616001, 1150616002, 1150616003, 1150616004, 1150617006,
1150617007, 1150617008, 1150617009, 1150617010, 1150617011, 1150618018,
1150618019, 1150618020, 1150618021, 1150618022, 1150618024, 1150618025,
1150618026, 1150618033, 1150618034, 1150618035, 1150618036, 1150618037,
1150623001, 1150623002, 1150623003, 1150623004, 1150623005, 1150623006,
1150623007, 1150623008, 1150623009, 1150623010, 1150623011, 1150623012,
1150623013, 1150623014, 1150623015, 1150623016, 1150623017, 1150623018,
1150623019, 1150623020, 1150623021, 1150623022, 1150623023, 1150623024,
1150623025, 1150623026, 1150623027, 1150623028, 1150623029, 1150623030,
1150623031, 1150611004, 1150611004, 1150611004, 1150717011, 1150717011,
1150717011, 1150723014, 1150723019, 1150723020, 1150724008, 1150724011,
1150724017]
for shot in shots:
plt.figure()
plt.title(str(shot))
time, dens = acquire.time_dens(shot)
start = acquire.gpi_series(shot, 'phantom2', 'settings.trig_time')
frame_rate = acquire.gpi_series(shot, 'phantom2', 'settings.frame_rate')
num_frames = acquire.gpi_series(shot, 'phantom2', 'settings.num_frames')
end = start + num_frames/float(frame_rate)
s = process.find_nearest(time, start)
e = process.find_nearest(time, end)
plt.plot(time[:s], dens[:s], 'b-')
plt.plot(time[s:e], dens[s:e], 'r-')
plt.plot(time[e:], dens[e:], 'b-')
plt.show()