-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
29 lines (22 loc) · 739 Bytes
/
example.py
File metadata and controls
29 lines (22 loc) · 739 Bytes
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
from HPST.hpst import Experiment
from matplotlib import pyplot as plt
exp = Experiment.load("run.dat", "run.json") # TODO Replace with actual filepaths
exp.t *= 1e3 # Convert to ms
plt.figure()
plt.title("Pressure")
for num, PCB in exp.PCB.items():
plt.plot(exp.t, PCB.pressure / 1e5, alpha=0.8, label=f"PCB {num}")
plt.legend()
if exp.kistler:
plt.plot(exp.t, exp.kistler.pressure / 1e5, label="Kistler")
plt.xlabel("Time [ms]")
plt.ylabel("Pressure [bar]")
if exp.emission:
plt.figure()
plt.title("Emissions")
for radical in exp.emission:
plt.plot(exp.t, exp.emission[radical], alpha=0.8, label=radical)
plt.legend()
plt.xlabel("Time [ms]")
plt.ylabel("Normalized Signal")
plt.show()