Skip to content

Commit

Permalink
Switch to using check_integrator in integrate_dxdv
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Jan 10, 2025
1 parent f2f76d5 commit bb31762
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions galpy/orbit/Orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ def integrate_dxdv(
Notes
-----
- Possible integration methods are:
- Possible integration methods are the non-symplectic ones in galpy:
- 'odeint' for scipy's odeint
- 'rk4_c' for a 4th-order Runge-Kutta integrator in C
Expand All @@ -1761,22 +1761,7 @@ def integrate_dxdv(
raise AttributeError(
"integrate_dxdv is only implemented for 4D (planar) orbits"
)
if method.lower() not in [
"odeint",
"dop853",
"rk4_c",
"rk6_c",
"dopr54_c",
"dop853_c",
]:
if "leapfrog" in method.lower() or "symplec" in method.lower():
raise ValueError(
f"{method:s} is not a valid `method for integrate_dxdv, because symplectic integrators cannot be used`"
)
else:
raise ValueError(
f"{method:s} is not a valid `method for integrate_dxdv`"
)
self.check_integrator(method, no_symplec=True)
pot = flatten_potential(pot)
_check_potential_dim(self, pot)
_check_consistent_units(self, pot)
Expand Down

0 comments on commit bb31762

Please sign in to comment.