-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4e.py
More file actions
32 lines (30 loc) · 676 Bytes
/
4e.py
File metadata and controls
32 lines (30 loc) · 676 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
30
31
32
from pylab import *
data = loadtxt('pleiades.txt')
b = data[:,0]
v = data[:,1]
d = 116
V = v + 5 - 5 * log10(d)
bv = b-v
nxl = []
nyl = []
for i in range(len(bv)):
if (bv[i]<-0.04):
nxl.append(bv[i])
nyl.append(v[i])
nx = array(nxl)
ny = array(nyl)
_, pl1 = subplots()
plot(b-v,v,'b.')
plot(nx,ny,'r.')
ylabel('m_v')
xlabel('B-V')
ylim(14,2)
pl2 = pl1.twinx()
ylabel('M_v')
ylim(14+5-5*log10(d),2+5-5*log10(d))
plot(b-v,V,'b.',label='Main Sequence')
plot(nx,ny+5-5*log10(d),'r.')
xticks([-.35,-.31,-.16,0,.13,.27,.42,.58,.7,.89,1.18,1.45,1.63],['O5','B0','B5','A0','A5','F0','F5','G0','G5','K0','K5','M0','M5'])
title('Pleiades Cluster')
legend()
show()