-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposterior_plotter.py
33 lines (26 loc) · 1018 Bytes
/
posterior_plotter.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
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import os
#posterior plotter.
os.system('ls')
p1 = np.load(raw_input('First planet file? '))
p3 = np.load(raw_input('Third planet file? '))
p4 = np.load(raw_input('Fourth planet file? '))
allps = np.load(raw_input('All planets file? '))
for i in [0,1,2]:
n1, bins1, patches1 = plt.hist(p1.T[i], bins=50, color='r', histtype='step', label='Planet 1')
n3, bins3, patches3 = plt.hist(p3.T[i], bins=50, color='b', histtype='step', label='Planet 3')
n4, bins4, patches4 = plt.hist(p4.T[i], bins=50, color='g', histtype='step', label='Planet 4')
na, binsa, patchesa = plt.hist(allps.T[i], bins=50, color='k', histtype='step', label='All Three Planets')
plt.legend()
if i == 0:
plt.xlabel('Log(Stellar Density)')
plt.title('Stellar Density Posterior (No Burn-In)')
elif i == 1:
plt.xlabel('q1')
plt.title('q1 Posterior (No Burn-In)')
elif i == 2:
plt.xlabel('q2')
plt.title('q2 Posterior (No Burn-In)')
plt.show()