enterprise/signals/utils.py
def anis_orf(pos1, pos2, params, **kwargs):
    """Anisotropic GWB spatial correlation function."""

    anis_basis = kwargs["anis_basis"]
    psrs_pos = kwargs["psrs_pos"]
    lmax = kwargs["lmax"]

    psr1_index = [ii for ii in range(len(psrs_pos)) if np.all(psrs_pos[ii] == pos1)][0]
    psr2_index = [ii for ii in range(len(psrs_pos)) if np.all(psrs_pos[ii] == pos2)][0]

    clm = np.zeros((lmax + 1) ** 2)
    clm[0] = 2.0 * np.sqrt(np.pi)
    if lmax > 0:
        clm[1:] = params

    return sum(clm[ii] * basis for ii, basis in enumerate(anis_basis[: (lmax + 1) ** 2, psr1_index, psr2_index]))
Anisotropic GWB spatial correlation function.
Anisotropic GWB spatial correlation function.
Anisotropic GWB spatial correlation function .
def anis_orf(pos1, pos2, params, **kwargs):
    anis_basis = kwargs["anis_basis"]
    psrs_pos = kwargs["psrs_pos"]
    lmax = kwargs["lmax"]
    psr1_index = [ii for ii in range(len(psrs_pos)) if np.all(psrs_pos[ii] == pos1)][0]
    psr2_index = [ii for ii in range(len(psrs_pos)) if np.all(psrs_pos[ii] == pos2)][0]
    clm = np.zeros((lmax + 1) ** 2)
    clm[0] = 2.0 * np.sqrt(np.pi)
    if lmax > 0:
        clm[1:] = params
    return sum(clm[ii] * basis for ii, basis in enumerate(anis_basis[: (lmax + 1) ** 2, psr1_index, psr2_index]))
def anis_orf ( pos1 , pos2 , params , ** kwargs ) : anis_basis = kwargs [ "anis_basis" ] psrs_pos = kwargs [ "psrs_pos" ] lmax = kwargs [ "lmax" ] psr1_index = [ ii for ii in range ( len ( psrs_pos ) ) if np . all ( psrs_pos [ ii ] == pos1 ) ] [ 0 ] psr2_index = [ ii for ii in range ( len ( psrs_pos ) ) if np . all ( psrs_pos [ ii ] == pos2 ) ] [ 0 ] clm = np . zeros ( ( lmax + 1 ) ** 2 ) clm [ 0 ] = 2.0 * np . sqrt ( np . pi ) if lmax > 0 : clm [ 1 : ] = params return sum ( clm [ ii ] * basis for ii , basis in enumerate ( anis_basis [ : ( lmax + 1 ) ** 2 , psr1_index , psr2_index ] ) )
Anisotropic GWB spatial correlation function.
Anisotropic GWB spatial correlation function .
"""Anisotropic GWB spatial correlation function."""
pos1
pos2
params