Skip to content

Commit

Permalink
Omega definition shouldn't be in ecc block
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed May 23, 2019
1 parent 1ca5c8b commit a0b9c0c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions exoplanet/orbits/keplerian.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ def __init__(self,
if contact_points_kwargs is None:
contact_points_kwargs = dict()

if Omega is None:
self.Omega = None
else:
self.Omega = tt.as_tensor_variable(Omega)
self.cos_Omega = tt.cos(self.Omega)
self.sin_Omega = tt.sin(self.Omega)

# Eccentricity
self.contact_points_op = ContactPointsOp(**contact_points_kwargs)
if ecc is None:
Expand All @@ -124,13 +131,6 @@ def __init__(self,
self.cos_omega = tt.cos(self.omega)
self.sin_omega = tt.sin(self.omega)

if Omega is None:
self.Omega = None
else:
self.Omega = tt.as_tensor_variable(Omega)
self.cos_Omega = tt.cos(self.Omega)
self.sin_Omega = tt.sin(self.Omega)

opsw = 1 + self.sin_omega
E0 = 2 * tt.arctan2(tt.sqrt(1-self.ecc)*self.cos_omega,
tt.sqrt(1+self.ecc)*opsw)
Expand Down

0 comments on commit a0b9c0c

Please sign in to comment.