In [1]:
import matplotlib.pyplot as plt
from astropy import units
from galpy.potential import plotPotentials
%matplotlib inline
from bar_model import MWBarPotential as MWBP
from template import MiyamotoNagaiPotential as MNP


galpyWarning: A major change in versions > 1.1 is that all galpy.potential functions and methods take the potential as the first argument; previously methods such as evaluatePotentials, evaluateDensities, etc. would be called with (R,z,Pot), now they are called as (Pot,R,z) for greater consistency across the codebase
galpyWarning: interppotential_c extension module not loaded, because galpy_interppotential_c.cpython-35m-x86_64-linux-gnu.so image was not found

In [2]:
mwbp = MWBP()
mnp = MNP()

In [3]:
#plotPotentials(mnp)
plotPotentials(mwbp)


/home/annaj/cbp_usrp/bar_model.py:29: RuntimeWarning: invalid value encountered in double_scalars
  return (np.sqrt(rho**2 + z**2), np.arccos(z/np.sqrt(rho**2 + z**2))) # (rho, z) transformed to (r, theta)

Out[3]:
<matplotlib.image.AxesImage at 0x7f2aec8ccda0>

In [4]:
mwbp(1,1,1)


Out[4]:
0.60313490840692252

In [ ]: