Skip to content

Commit

Permalink
Fix for problem orbits. Ran black.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewholman committed Nov 18, 2023
1 parent 2f5bb2f commit a8fc454
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sorcha/ephemeris/orbit_conversion_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def universal_cartesian(mu, q, e, incl, longnode, argperi, tp, epochMJD_TDB):
p = q * (1 + e)
t = epochMJD_TDB - tp # tp - epochMJD_TDB

if e<1:
a = q/(1-e)
per = 2*np.pi/np.sqrt(mu/(a*a*a))
t = t % per
if e < 1:
a = q / (1 - e)
per = 2 * np.pi / np.sqrt(mu / (a * a * a))
t = t % per

Check warning on line 121 in src/sorcha/ephemeris/orbit_conversion_utilities.py

View check run for this annotation

Codecov / codecov/patch

src/sorcha/ephemeris/orbit_conversion_utilities.py#L118-L121

Added lines #L118 - L121 were not covered by tests

# Establish constants for Kepler's equation,
# starting at pericenter:
r0 = q
Expand Down

0 comments on commit a8fc454

Please sign in to comment.