def __init__(self,amp=1.,a=1.,n=2,b=0.35,c=0.2375,omegab=0.,
                 pa=0.,normalize=False,ro=None,vo=None):
        """
        NAME:

           __init__

        PURPOSE:

           initialize a Ferrers potential

        INPUT:

           amp - total mass of the ellipsoid determines the amplitude of the potential; can be a Quantity with units of mass or Gxmass

           a - scale radius (can be Quantity)

           n - power of Ferrers density (n > 0)

           b - y-to-x axis ratio of the density

           c - z-to-x axis ratio of the density

           omegab - rotation speed of the ellipsoid (can be Quantity)

           pa= (None) If set, the position angle of the x axis (rad or Quantity)

           normalize - if True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1.

           ro=, vo= distance and velocity scales for translation into internal units (default from configuration file)

        OUTPUT:

           (none)

        """
        Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass')
        if _APY_LOADED and isinstance(a,units.Quantity):
            a= a.to(units.kpc).value/self._ro
        if _APY_LOADED and isinstance(omegab,units.Quantity):
            omegab= omegab.to(units.km/units.s/units.kpc).value\
                /bovy_conversion.freq_in_kmskpc(self._vo,self._ro)
        if _APY_LOADED and isinstance(pa,units.Quantity):
            pa= pa.to(units.rad).value
        self.a= a
        self._scale= self.a
        if n <= 0:
            raise ValueError('FerrersPotential requires n > 0')
        self.n= n
        self._b= b
        self._c= c
        self._omegab= omegab
        self._a2= self.a**2
        self._b2= self._b**2.
        self._c2= self._c**2.
        self._force_hash= None
        self._pa = pa
        self._rhoc_M = gamma(n+2.5)/gamma(n+1) / np.pi**1.5/a**3/b/c
        if normalize or \
                (isinstance(normalize,(int,float)) \
                     and not isinstance(normalize,bool)): #pragma: no cover
            self.normalize(normalize)
        if np.fabs(self._b-1.) > 10.**-10.:
            self.isNonAxi= True
        return None
def __init__ ( self , amp = 1. , a = 1. , n = 2 , b = 0.35 , c = 0.2375 , omegab = 0. , pa = 0. , normalize = False , ro = None , vo = None ) : Potential . __init__ ( self , amp = amp , ro = ro , vo = vo , amp_units = 'mass' ) if _APY_LOADED and isinstance ( a , units . Quantity ) : a = a . to ( units . kpc ) . value / self . _ro if _APY_LOADED and isinstance ( omegab , units . Quantity ) : omegab = omegab . to ( units . km / units . s / units . kpc ) . value / bovy_conversion . freq_in_kmskpc ( self . _vo , self . _ro ) if _APY_LOADED and isinstance ( pa , units . Quantity ) : pa = pa . to ( units . rad ) . value self . a = a self . _scale = self . a if n <= 0 : raise ValueError ( 'FerrersPotential requires n > 0' ) self . n = n self . _b = b self . _c = c self . _omegab = omegab self . _a2 = self . a ** 2 self . _b2 = self . _b ** 2. self . _c2 = self . _c ** 2. self . _force_hash = None self . _pa = pa self . _rhoc_M = gamma ( n + 2.5 ) / gamma ( n + 1 ) / np . pi ** 1.5 / a ** 3 / b / c if normalize or ( isinstance ( normalize , ( int , float ) ) and not isinstance ( normalize , bool ) ) : self . normalize ( normalize ) if np . fabs ( self . _b - 1. ) > 10. ** - 10. : self . isNonAxi = True return None
NAME:

           __init__

        PURPOSE:

           initialize a Ferrers potential

        INPUT:

           amp - total mass of the ellipsoid determines the amplitude of the potential; can be a Quantity with units of mass or Gxmass

           a - scale radius (can be Quantity)

           n - power of Ferrers density (n > 0)

           b - y-to-x axis ratio of the density

           c - z-to-x axis ratio of the density

           omegab - rotation speed of the ellipsoid (can be Quantity)

           pa= (None) If set, the position angle of the x axis (rad or Quantity)

           normalize - if True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1.

           ro=, vo= distance and velocity scales for translation into internal units (default from configuration file)

        OUTPUT:

           (none)