#!/usr/bin/python

import solve

ecc=1.5
N=2000
M=2000
x=[]
y=[]
for n in range(N,2*N):
    x.append(n*1.0/M)
    y.append(solve.solve_for_hyperbolic_anomaly((n*1.0/M),ecc))

fh=open('hyperbolicanomaly.gnuplot','w')
for n in range(N):
    fh.write(str(x[n]))
    fh.write(" ")
    fh.write(str(y[n]))
    fh.write("\n")

fh.close()
 def test_hyperbolic_anomaly_solver(self):
     self.assertEqual(0.0,solve.solve_for_hyperbolic_anomaly(0,0))
     self.assertEqual(0.0,solve.solve_for_hyperbolic_anomaly(1,1.5))
     self.assertEqual(1.612685809796164,solve.solve_for_hyperbolic_anomaly(2,1.5))