# Class that implements the anisotropic spherical Hernquist DF with constant
# beta parameter
import numpy
import pdb
import scipy.special
import scipy.integrate
from .constantbetadf import constantbetadf
from .df import _APY_LOADED
from ..potential import evaluatePotentials,HernquistPotential
if _APY_LOADED:
    from astropy import units

class constantbetaHernquistdf(constantbetadf):
    """Class that implements the anisotropic spherical Hernquist DF with constant beta parameter"""
    def __init__(self,pot=None,beta=0,ro=None,vo=None):
        """
        NAME:

            __init__

        PURPOSE:

            Initialize a DF with constant anisotropy

        INPUT:

            pot - Hernquist potential which determines the DF

            beta - anisotropy parameter

        OUTPUT:

            None

        HISTORY:

            2020-07-22 - Written
        """
        assert isinstance(pot,HernquistPotential),'pot= must be potential.HernquistPotential'
        constantbetadf.__init__(self,pot=pot,beta=beta,ro=ro,vo=vo)


    def f1E(self,E):
        # Stub for computing f_1(E)
        return None

    

@@ -1040,16 +1040,495 @@
 vo=vo)%0A%0A
+    def __call_internal__(self,*args):%0A        %22%22%22%0A        NAME:%0A%0A            __call_internal%0A%0A        PURPOSE:%0A%0A            Evaluate the DF for a constant anisotropy Hernquist%0A%0A        INPUT:%0A%0A            E - The energy%0A%0A            L - The angular momentum%0A%0A        OUTPUT:%0A%0A            fH - The value of the DF%0A%0A        HISTORY:%0A%0A            2020-07-22 - Written%0A        %22%22%22%0A        E = args%5B0%5D%0A        L = args%5B1%5D%0A        f1 = self.f1E(E)%0A        return L**(-2*self.beta)*f1%0A
 %0A    def

Add __call_internal__ for constantbetaHernquistdf