def _chi_n_m(self, r, beta, n, m):
        """

        :param r: radius / beta
        :param beta: shapelet scale
        :param n: non-negative integer
        :param m: integer, running from -n to n in steps of two
        :return: value of function (8) in Massey & Refregier, complex numbers
        """
        m_abs = int(abs(m))
        p = int((n - m_abs)/2)
        p2 = int((n + m_abs)/2)
        if p % 2 == 0:  # if p is even
            prefac = 1
        else:
            prefac = -1
        prefactor = prefac/beta**(m_abs + 1)*np.sqrt(math.factorial(p)/(np.pi*math.factorial(p2)))
        poly = scipy.special.genlaguerre(n=p, alpha=m_abs)  # lower part, upper part of definition in Massey & Refregier
        r_ = (r/beta)**2
        L_n_alpha = poly(r_)
        return prefactor*r**m_abs*L_n_alpha*np.exp(-(r/beta)**2/2)
def _chi_n_m ( self , r , beta , n , m ) : m_abs = int ( abs ( m ) ) p = int ( ( n - m_abs ) / 2 ) p2 = int ( ( n + m_abs ) / 2 ) if p % 2 == 0 : prefac = 1 else : prefac = - 1 prefactor = prefac / beta ** ( m_abs + 1 ) * np . sqrt ( math . factorial ( p ) / ( np . pi * math . factorial ( p2 ) ) ) poly = scipy . special . genlaguerre ( n = p , alpha = m_abs ) r_ = ( r / beta ) ** 2 L_n_alpha = poly ( r_ ) return prefactor * r ** m_abs * L_n_alpha * np . exp ( - ( r / beta ) ** 2 / 2 )
:param r: radius / beta
        :param beta: shapelet scale
        :param n: non-negative integer
        :param m: integer, running from -n to n in steps of two
        :return: value of function (8) in Massey & Refregier, complex numbers