enterprise/signals/utils.py
def create_gw_antenna_pattern(pos, gwtheta, gwphi):
    """
    Function to create pulsar antenna pattern functions as defined
    in Ellis, Siemens, and Creighton (2012).
    :param pos: Unit vector from Earth to pulsar
    :param gwtheta: GW polar angle in radians
    :param gwphi: GW azimuthal angle in radians

    :return: (fplus, fcross, cosMu), where fplus and fcross
             are the plus and cross antenna pattern functions
             and cosMu is the cosine of the angle between the
             pulsar and the GW source.
    """

    # use definition from Sesana et al 2010 and Ellis et al 2012
    m = np.array([np.sin(gwphi), -np.cos(gwphi), 0.0])
    n = np.array([-np.cos(gwtheta) * np.cos(gwphi), -np.cos(gwtheta) * np.sin(gwphi), np.sin(gwtheta)])
    omhat = np.array([-np.sin(gwtheta) * np.cos(gwphi), -np.sin(gwtheta) * np.sin(gwphi), -np.cos(gwtheta)])

    fplus = 0.5 * (np.dot(m, pos) ** 2 - np.dot(n, pos) ** 2) / (1 + np.dot(omhat, pos))
    fcross = (np.dot(m, pos) * np.dot(n, pos)) / (1 + np.dot(omhat, pos))
    cosMu = -np.dot(omhat, pos)

    return fplus, fcross, cosMu

    Function to create pulsar antenna pattern functions as defined
    in Ellis, Siemens, and Creighton (2012).
    :param pos: Unit vector from Earth to pulsar
    :param gwtheta: GW polar angle in radians
    :param gwphi: GW azimuthal angle in radians

    :return: (fplus, fcross, cosMu), where fplus and fcross
             are the plus and cross antenna pattern functions
             and cosMu is the cosine of the angle between the
             pulsar and the GW source.
    
Function to create pulsar antenna pattern functions as defined
in Ellis, Siemens, and Creighton (2012).
Function to create pulsar antenna pattern functions as defined in Ellis Siemens and Creighton ( 2012 ) .
def create_gw_antenna_pattern(pos, gwtheta, gwphi):
    m = np.array([np.sin(gwphi), -np.cos(gwphi), 0.0])
    n = np.array([-np.cos(gwtheta) * np.cos(gwphi), -np.cos(gwtheta) * np.sin(gwphi), np.sin(gwtheta)])
    omhat = np.array([-np.sin(gwtheta) * np.cos(gwphi), -np.sin(gwtheta) * np.sin(gwphi), -np.cos(gwtheta)])
    fplus = 0.5 * (np.dot(m, pos) ** 2 - np.dot(n, pos) ** 2) / (1 + np.dot(omhat, pos))
    fcross = (np.dot(m, pos) * np.dot(n, pos)) / (1 + np.dot(omhat, pos))
    cosMu = -np.dot(omhat, pos)
    return fplus, fcross, cosMu
def create_gw_antenna_pattern ( pos , gwtheta , gwphi ) : m = np . array ( [ np . sin ( gwphi ) , - np . cos ( gwphi ) , 0.0 ] ) n = np . array ( [ - np . cos ( gwtheta ) * np . cos ( gwphi ) , - np . cos ( gwtheta ) * np . sin ( gwphi ) , np . sin ( gwtheta ) ] ) omhat = np . array ( [ - np . sin ( gwtheta ) * np . cos ( gwphi ) , - np . sin ( gwtheta ) * np . sin ( gwphi ) , - np . cos ( gwtheta ) ] ) fplus = 0.5 * ( np . dot ( m , pos ) ** 2 - np . dot ( n , pos ) ** 2 ) / ( 1 + np . dot ( omhat , pos ) ) fcross = ( np . dot ( m , pos ) * np . dot ( n , pos ) ) / ( 1 + np . dot ( omhat , pos ) ) cosMu = - np . dot ( omhat , pos ) return fplus , fcross , cosMu
Function to create pulsar antenna pattern functions as defined
in Ellis, Siemens, and Creighton (2012).
Function to create pulsar antenna pattern functions as defined in Ellis Siemens and Creighton ( 2012 ) .
"""
    Function to create pulsar antenna pattern functions as defined
    in Ellis, Siemens, and Creighton (2012).
    :param pos: Unit vector from Earth to pulsar
    :param gwtheta: GW polar angle in radians
    :param gwphi: GW azimuthal angle in radians

    :return: (fplus, fcross, cosMu), where fplus and fcross
             are the plus and cross antenna pattern functions
             and cosMu is the cosine of the angle between the
             pulsar and the GW source.
    """ # use definition from Sesana et al 2010 and Ellis et al 2012
(fplus, fcross, cosMu), where fplus and fcross
are the plus and cross antenna pattern functions
and cosMu is the cosine of the angle between the
pulsar and the GW source.
( fplus fcross cosMu ) where fplus and fcross are the plus and cross antenna pattern functions and cosMu is the cosine of the angle between the pulsar and the GW source .
pos
Unit vector from Earth to pulsar
Unit vector from Earth to pulsar
gwtheta
GW polar angle in radians
GW polar angle in radians
gwphi
GW azimuthal angle in radians
GW azimuthal angle in radians