#!/usr/bin/python

import math

#const number
A=3.90802e-3
B=-5.80195e-7

#data from experiment
R_t=[1.1157,1.1178,1.1190,1.1209,1.1219,1.1238,1.1246,1.1266,1.1288,1.1297,1.1310,1.1318,1.1336,1.1346,1.1356,1.1365,1.1380,1.1390,1.1405,1.1418,1.1426,1.1440,1.1456,1.1463,1.1476,1.1492,1.1501,1.1507,1.1516,1.1526,1.1542]
R_eviroment=1.0912

#equation about R and T
def R2T(r):
   return (-A+math.sqrt(A*A-4*B*(1-r)))/(2*B)

theta_eviroment=R2T(R_eviroment)
theta=[]
for i in range(31):
   theta.append(R2T(R_t[i]))

Y=[]
for i in range(30):
   Y.append((theta[i+1]-theta[i])/60)

X=[]
for i in range(30):
   X.append((theta[i+1]+theta[i])/2-theta_eviroment)

print X
print Y
print theta_eviroment
