enterprise/signals/utils.py
def bwm_delay(toas, pos, log10_h=-14.0, cos_gwtheta=0.0, gwphi=0.0, gwpol=0.0, t0=55000, antenna_pattern_fn=None):
    """
    Function that calculates the earth-term gravitational-wave
    burst-with-memory signal, as described in:
    Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet.
    This version uses the F+/Fx polarization modes, as verified with the
    Continuous Wave and Anisotropy papers.

    :param toas: Time-of-arrival measurements [s]
    :param pos: Unit vector from Earth to pulsar
    :param log10_h: log10 of GW strain
    :param cos_gwtheta: Cosine of GW polar angle
    :param gwphi: GW azimuthal polar angle [rad]
    :param gwpol: GW polarization angle
    :param t0: Burst central time [day]
    :param antenna_pattern_fn:
        User defined function that takes `pos`, `gwtheta`, `gwphi` as
        arguments and returns (fplus, fcross)

    :return: the waveform as induced timing residuals (seconds)
    """

    # convert
    h = 10 ** log10_h
    gwtheta = np.arccos(cos_gwtheta)
    t0 *= const.day

    # antenna patterns
    if antenna_pattern_fn is None:
        apc = create_gw_antenna_pattern(pos, gwtheta, gwphi)
    else:
        apc = antenna_pattern_fn(pos, gwtheta, gwphi)

    # grab fplus, fcross
    fp, fc = apc[0], apc[1]

    # combined polarization
    pol = np.cos(2 * gwpol) * fp + np.sin(2 * gwpol) * fc

    # Define the heaviside function
    heaviside = lambda x: 0.5 * (np.sign(x) + 1)

    # Return the time-series for the pulsar
    return pol * h * heaviside(toas - t0) * (toas - t0)

    Function that calculates the earth-term gravitational-wave
    burst-with-memory signal, as described in:
    Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet.
    This version uses the F+/Fx polarization modes, as verified with the
    Continuous Wave and Anisotropy papers.

    :param toas: Time-of-arrival measurements [s]
    :param pos: Unit vector from Earth to pulsar
    :param log10_h: log10 of GW strain
    :param cos_gwtheta: Cosine of GW polar angle
    :param gwphi: GW azimuthal polar angle [rad]
    :param gwpol: GW polarization angle
    :param t0: Burst central time [day]
    :param antenna_pattern_fn:
        User defined function that takes `pos`, `gwtheta`, `gwphi` as
        arguments and returns (fplus, fcross)

    :return: the waveform as induced timing residuals (seconds)
    
Function that calculates the earth-term gravitational-wave
burst-with-memory signal, as described in:
Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet.
This version uses the F+/Fx polarization modes, as verified with the
Continuous Wave and Anisotropy papers.
Function that calculates the earth - term gravitational - wave burst - with - memory signal as described in : Seto et al van haasteren and Levin phsirkov et al Cordes and Jenet . This version uses the F + / Fx polarization modes as verified with the Continuous Wave and Anisotropy papers .
def bwm_delay(toas, pos, log10_h=-14.0, cos_gwtheta=0.0, gwphi=0.0, gwpol=0.0, t0=55000, antenna_pattern_fn=None):
    h = 10 ** log10_h
    gwtheta = np.arccos(cos_gwtheta)
    t0 *= const.day
    if antenna_pattern_fn is None:
        apc = create_gw_antenna_pattern(pos, gwtheta, gwphi)
    else:
        apc = antenna_pattern_fn(pos, gwtheta, gwphi)
    fp, fc = apc[0], apc[1]
    pol = np.cos(2 * gwpol) * fp + np.sin(2 * gwpol) * fc
    heaviside = lambda x: 0.5 * (np.sign(x) + 1)
    return pol * h * heaviside(toas - t0) * (toas - t0)
def bwm_delay ( toas , pos , log10_h = - 14.0 , cos_gwtheta = 0.0 , gwphi = 0.0 , gwpol = 0.0 , t0 = 55000 , antenna_pattern_fn = None ) : h = 10 ** log10_h gwtheta = np . arccos ( cos_gwtheta ) t0 *= const . day if antenna_pattern_fn is None : apc = create_gw_antenna_pattern ( pos , gwtheta , gwphi ) else : apc = antenna_pattern_fn ( pos , gwtheta , gwphi ) fp , fc = apc [ 0 ] , apc [ 1 ] pol = np . cos ( 2 * gwpol ) * fp + np . sin ( 2 * gwpol ) * fc heaviside = lambda x : 0.5 * ( np . sign ( x ) + 1 ) return pol * h * heaviside ( toas - t0 ) * ( toas - t0 )
Function that calculates the earth-term gravitational-wave
burst-with-memory signal, as described in:
Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet.
Function that calculates the earth - term gravitational - wave burst - with - memory signal as described in : Seto et al van haasteren and Levin phsirkov et al Cordes and Jenet .
"""
    Function that calculates the earth-term gravitational-wave
    burst-with-memory signal, as described in:
    Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet.
    This version uses the F+/Fx polarization modes, as verified with the
    Continuous Wave and Anisotropy papers.

    :param toas: Time-of-arrival measurements [s]
    :param pos: Unit vector from Earth to pulsar
    :param log10_h: log10 of GW strain
    :param cos_gwtheta: Cosine of GW polar angle
    :param gwphi: GW azimuthal polar angle [rad]
    :param gwpol: GW polarization angle
    :param t0: Burst central time [day]
    :param antenna_pattern_fn:
        User defined function that takes `pos`, `gwtheta`, `gwphi` as
        arguments and returns (fplus, fcross)

    :return: the waveform as induced timing residuals (seconds)
    """ # convert # antenna patterns # grab fplus, fcross # combined polarization # Define the heaviside function # Return the time-series for the pulsar
the waveform as induced timing residuals (seconds)
the waveform as induced timing residuals ( seconds )
toas
Time-of-arrival measurements [s]
Time - of - arrival measurements [ s ]
pos
Unit vector from Earth to pulsar
Unit vector from Earth to pulsar
log10_h
log10 of GW strain
log10 of GW strain
cos_gwtheta
Cosine of GW polar angle
Cosine of GW polar angle
gwphi
GW azimuthal polar angle [rad]
GW azimuthal polar angle [ rad ]
gwpol
GW polarization angle
GW polarization angle
t0
Burst central time [day]
Burst central time [ day ]
antenna_pattern_fn
User defined function that takes `pos`, `gwtheta`, `gwphi` as
arguments and returns (fplus, fcross)
User defined function that takes ` pos ` ` gwtheta ` ` gwphi ` as arguments and returns ( fplus fcross )