/
plot_MC.py
63 lines (45 loc) · 1.07 KB
/
plot_MC.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import numpy as np
import lichen.lichen as lch
import matplotlib.pyplot as plt
import sys
vals = np.loadtxt(sys.argv[1])
days = vals[:,0]
energies = vals[:,1]
risetimes = vals[:,2]
plt.figure(figsize=(12,4))
plt.subplot(1,3,1)
lch.hist_err(energies,bins=50)
plt.xlabel('Recoil energy (keVee)')
plt.ylim(0)
plt.subplot(1,3,2)
lch.hist_err(days,bins=50)
plt.xlabel('Days since XXX')
plt.ylim(0)
plt.subplot(1,3,3)
lch.hist_err(risetimes,bins=50,range=(0,6))
plt.xlabel(r'Rise times ($\mu$s)')
plt.ylim(0)
plt.xlim(0,6)
plt.tight_layout()
'''
# Scatter
plt.figure(figsize=(12,4))
plt.subplot(1,3,1)
plt.plot(energies,days,'o',markersize=1,alpha=0.1)
plt.xlabel('Recoil energy (keVee)')
plt.ylabel('Days since XXX')
#plt.ylim(0)
plt.subplot(1,3,2)
plt.plot(days,risetimes,'o',markersize=1,alpha=0.1)
plt.xlabel('Days since XXX')
plt.ylabel(r'Rise times ($\mu$s)')
#plt.ylim(0)
plt.subplot(1,3,3)
plt.plot(energies,risetimes,'o',markersize=1,alpha=0.1)
plt.xlabel('Recoil energy (keVee)')
plt.ylabel(r'Rise times ($\mu$s)')
#plt.ylim(0)
#plt.xlim(0,6)
plt.tight_layout()
'''
plt.show()