Skip to content

Commit

Permalink
made frontend batman compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlouden committed Aug 11, 2016
1 parent a70e6ff commit 0e9a764
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
5 changes: 4 additions & 1 deletion spiderman/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
__all__ = ["web","test","_test"]
from spiderman.params import *
from spiderman.web import *

__all__ = ["web","params","_web"]
16 changes: 16 additions & 0 deletions spiderman/params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class ModelParams(object):
def __init__(self):
self.t0= None
self.per= None
self.a_abs= None
self.inc= None
self.ecc= None
self.w= None
self.a= None
self.rp= None
self.xi= None
self.T_n= None
self.delta_T= None
self.p_u1= None
self.p_u2= None
self.T_s= None
8 changes: 2 additions & 6 deletions spiderman/web.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import spiderman._web as _web
import spiderman._polar as _polar

def one_in_one_out(c1,c2,e1,e2,r_inner,r_outer,r2,x2,y2):
return _web.one_in_one_out(c1,c2,e1,e2,r_inner,r_outer,r2,x2,y2)
Expand All @@ -16,9 +15,6 @@ def find_quad_area(a,b,c,d):
def segment(r,theta):
return _web.segment(r,theta)

def polar(r1,r2,theta1,theta2):
return _polar.polar(r1,r2,theta1,theta2)

def circle_intersect(x1,y1,r1,x2,y2,r2):
return _web.circle_intersect(x1,y1,r1,x2,y2,r2)

Expand All @@ -37,5 +33,5 @@ def zhang_2016(lat,lon,xi,T_n,delta_T):
def separation_of_centers(t,tc,per,a,inc,ecc,omega,a_rs,r2):
return _web.separation_of_centers(t,tc,per,a,inc,ecc,omega,a_rs,r2)

def lightcurve(n_layers,t,tc,per,a,inc,ecc,omega,a_rs,rp,xi,T_n,delta_T,p_u1,p_u2,T_s):
return _web.lightcurve(n_layers,t,tc,per,a,inc,ecc,omega,a_rs,rp,xi,T_n,delta_T,p_u1,p_u2,T_s)
def lightcurve(t,sp,n_layers=5):
return _web.lightcurve(n_layers,t,sp.t0,sp.per,sp.a_abs,sp.inc,sp.ecc,sp.w,sp.a,sp.rp,sp.xi,sp.T_n,sp.delta_T,sp.p_u1,sp.p_u2,sp.T_s)

0 comments on commit 0e9a764

Please sign in to comment.