Skip to content

Commit

Permalink
Avoid circular-ish import, which for some reason is sometimes an issu…
Browse files Browse the repository at this point in the history
…e in Python 2.7, but not in python 3 (?)
  • Loading branch information
jobovy committed Jul 21, 2018
1 parent 18b2787 commit c396f38
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion galpy/actionAngle/actionAngleAdiabatic_c.py
Expand Up @@ -7,7 +7,6 @@
import numpy
from numpy.ctypeslib import ndpointer
from galpy.util import galpyWarning
from galpy.orbit.integrateFullOrbit import _parse_pot
#Find and load the library
_lib= None
outerr= None
Expand Down Expand Up @@ -54,6 +53,7 @@ def actionAngleAdiabatic_c(pot,gamma,R,vR,vT,z,vz):
2012-12-10 - Written - Bovy (IAS)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Set up result arrays
Expand Down Expand Up @@ -134,6 +134,7 @@ def actionAngleRperiRapZmaxAdiabatic_c(pot,gamma,R,vR,vT,z,vz):
2017-12-21 - Written - Bovy (UofT)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Set up result arrays
Expand Down
6 changes: 5 additions & 1 deletion galpy/actionAngle/actionAngleStaeckel_c.py
Expand Up @@ -7,7 +7,6 @@
import numpy
from numpy.ctypeslib import ndpointer
from galpy.util import galpyWarning
from galpy.orbit.integrateFullOrbit import _parse_pot
from galpy.util import bovy_coords
#Find and load the library
_lib= None
Expand Down Expand Up @@ -59,6 +58,7 @@ def actionAngleStaeckel_c(pot,delta,R,vR,vT,z,vz,u0=None,order=10):
if u0 is None:
u0, dummy= bovy_coords.Rz_to_uv(R,z,delta=numpy.atleast_1d(delta))
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Parse delta
Expand Down Expand Up @@ -155,6 +155,7 @@ def actionAngleStaeckel_calcu0(E,Lz,pot,delta):
2012-12-03 - Written - Bovy (IAS)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Set up result arrays
Expand Down Expand Up @@ -230,6 +231,7 @@ def actionAngleFreqStaeckel_c(pot,delta,R,vR,vT,z,vz,u0=None,order=10):
if u0 is None:
u0, dummy= bovy_coords.Rz_to_uv(R,z,delta=numpy.atleast_1d(delta))
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Parse delta
Expand Down Expand Up @@ -345,6 +347,7 @@ def actionAngleFreqAngleStaeckel_c(pot,delta,R,vR,vT,z,vz,phi,
if u0 is None:
u0, dummy= bovy_coords.Rz_to_uv(R,z,delta=numpy.atleast_1d(delta))
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Parse delta
Expand Down Expand Up @@ -474,6 +477,7 @@ def actionAngleUminUmaxVminStaeckel_c(pot,delta,R,vR,vT,z,vz,u0=None):
if u0 is None:
u0, dummy= bovy_coords.Rz_to_uv(R,z,delta=numpy.atleast_1d(delta))
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potforactions=True)

#Parse delta
Expand Down
5 changes: 4 additions & 1 deletion galpy/actionAngle/actionAngleTorus_c.py
Expand Up @@ -7,7 +7,6 @@
import numpy
from numpy.ctypeslib import ndpointer
from galpy.util import galpyWarningVerbose
from galpy.orbit.integrateFullOrbit import _parse_pot
#Find and load the library
_lib= None
outerr= None
Expand Down Expand Up @@ -59,6 +58,7 @@ def actionAngleTorus_xvFreqs_c(pot,jr,jphi,jz,
2015-08-05/07 - Written - Bovy (UofT)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potfortorus=True)

#Set up result arrays
Expand Down Expand Up @@ -158,6 +158,7 @@ def actionAngleTorus_Freqs_c(pot,jr,jphi,jz,
2015-08-05/07 - Written - Bovy (UofT)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potfortorus=True)

#Set up result
Expand Down Expand Up @@ -221,6 +222,7 @@ def actionAngleTorus_hessian_c(pot,jr,jphi,jz,
2016-07-15 - Written - Bovy (UofT)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potfortorus=True)

#Set up result
Expand Down Expand Up @@ -295,6 +297,7 @@ def actionAngleTorus_jacobian_c(pot,jr,jphi,jz,angler,anglephi,anglez,
2016-07-19 - Written - Bovy (UofT)
"""
#Parse the potential
from galpy.orbit.integrateFullOrbit import _parse_pot
npot, pot_type, pot_args= _parse_pot(pot,potfortorus=True)

#Set up result
Expand Down

0 comments on commit c396f38

Please sign in to comment.