コード例 #1
0
def Y(L_max,m,s,cos_theta):
    """
        Gives spin-wieghted spherical harmonic functions on the Gauss quaduature grid.
        Returns an array with shape = ( L_max-L_min(m,s) + 1, len(cos_theta) ).

        Parameters
        ----------
        L_max, m,s : int
        spherical harmonic parameters.
        dm, ds: int
        increments in (m,s)
        a,b : int
        starting Jacobi parameters
        da,db: int
        increments in (a,b)

    """

    a, b  = a_and_b(m,s)
    N     = L_max - L_min(m,s)
    phase = (-1)**max(m,-s)

    init=phase*jacobi.envelope(a,b,0,0,cos_theta)

    return jacobi.recursion(N,a,b,cos_theta,init)
コード例 #2
0
def polynomial(N, k, ell, z, a=alpha):
    """ N is max degree of output Jacobi polynomial. 
        There will be blood if N >> len(z) - ell//2."""

    q, m = k + a, ell + 1 / 2

    init = np.sqrt(2**(k + 5 / 2)) * jacobi.envelope(q, m, q, 1 / 2, z)

    return jacobi.recursion(N, q, m, z, init)
コード例 #3
0
ファイル: disk128.py プロジェクト: choshoguay/Replications
def polynomial(N_max,k,m,z,a=alpha):
    
    q = k + a
    
    N = N_max # - some function of m
    
    init = np.sqrt(2**k)*jacobi.envelope(q,m,q,0,z)
    
    return jacobi.recursion(N,q,m,z,init)