Skip to content

Commit c4035b6

Browse files
committed
Switch to using check_integrator in integrate_dxdv
1 parent f2f76d5 commit c4035b6

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

galpy/orbit/Orbits.py

+2-17
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ def integrate_dxdv(
17431743
17441744
Notes
17451745
-----
1746-
- Possible integration methods are:
1746+
- Possible integration methods are the non-symplectic ones in galpy:
17471747
17481748
- 'odeint' for scipy's odeint
17491749
- 'rk4_c' for a 4th-order Runge-Kutta integrator in C
@@ -1761,22 +1761,7 @@ def integrate_dxdv(
17611761
raise AttributeError(
17621762
"integrate_dxdv is only implemented for 4D (planar) orbits"
17631763
)
1764-
if method.lower() not in [
1765-
"odeint",
1766-
"dop853",
1767-
"rk4_c",
1768-
"rk6_c",
1769-
"dopr54_c",
1770-
"dop853_c",
1771-
]:
1772-
if "leapfrog" in method.lower() or "symplec" in method.lower():
1773-
raise ValueError(
1774-
f"{method:s} is not a valid `method for integrate_dxdv, because symplectic integrators cannot be used`"
1775-
)
1776-
else:
1777-
raise ValueError(
1778-
f"{method:s} is not a valid `method for integrate_dxdv`"
1779-
)
1764+
self.check_integrator(method, no_symplec=True)
17801765
pot = flatten_potential(pot)
17811766
_check_potential_dim(self, pot)
17821767
_check_consistent_units(self, pot)

0 commit comments

Comments
 (0)