enterprise/signals/utils.py
def calculate_splus_scross(nmax, mc, dl, h0, F, e, t, l0, gamma, gammadot, inc):
    """
    Calculate splus and scross for a CGW summed over all harmonics.
    This waveform differs slightly from that in Taylor et al (2016)
    in that it includes the time dependence of the advance of periastron.

    :param nmax: Total number of harmonics to use
    :param mc: Chirp mass of binary [Solar Mass]
    :param dl: Luminosity distance [Mpc]
    :param F: Orbital frequency of binary [Hz]
    :param e: Orbital Eccentricity
    :param t: TOAs [s]
    :param l0: Initial eccentric anomoly [rad]
    :param gamma: Angle of periastron advance [rad]
    :param gammadot: Time derivative of angle of periastron advance [rad/s]
    :param inc: Inclination angle [rad]

    :return splus, scross: plus and cross time-domain waveforms for a CGW
    """
    n = np.arange(1, nmax)

    # time dependent amplitudes
    an = get_an(n, mc, dl, h0, F, e)
    bn = get_bn(n, mc, dl, h0, F, e)
    cn = get_cn(n, mc, dl, h0, F, e)

    # time dependent terms
    omega = 2 * np.pi * F
    gt = gamma + gammadot * t
    lt = l0 + omega * t

    # tiled phase
    phase1 = n * np.tile(lt, (nmax - 1, 1)).T
    phase2 = np.tile(gt, (nmax - 1, 1)).T

    sinp1 = np.sin(phase1)
    cosp1 = np.cos(phase1)
    sinp2 = np.sin(2 * phase2)
    cosp2 = np.cos(2 * phase2)

    sinpp = sinp1 * cosp2 + cosp1 * sinp2
    cospp = cosp1 * cosp2 - sinp1 * sinp2
    sinpm = sinp1 * cosp2 - cosp1 * sinp2
    cospm = cosp1 * cosp2 + sinp1 * sinp2

    # intermediate terms
    sp = sinpm / (n * omega - 2 * gammadot) + sinpp / (n * omega + 2 * gammadot)
    sm = sinpm / (n * omega - 2 * gammadot) - sinpp / (n * omega + 2 * gammadot)
    cp = cospm / (n * omega - 2 * gammadot) + cospp / (n * omega + 2 * gammadot)
    cm = cospm / (n * omega - 2 * gammadot) - cospp / (n * omega + 2 * gammadot)

    splus_n = -0.5 * (1 + np.cos(inc) ** 2) * (an * sp - bn * sm) + (1 - np.cos(inc) ** 2) * cn * sinp1
    scross_n = np.cos(inc) * (an * cm - bn * cp)

    return np.sum(splus_n, axis=1), np.sum(scross_n, axis=1)

    Calculate splus and scross for a CGW summed over all harmonics.
    This waveform differs slightly from that in Taylor et al (2016)
    in that it includes the time dependence of the advance of periastron.

    :param nmax: Total number of harmonics to use
    :param mc: Chirp mass of binary [Solar Mass]
    :param dl: Luminosity distance [Mpc]
    :param F: Orbital frequency of binary [Hz]
    :param e: Orbital Eccentricity
    :param t: TOAs [s]
    :param l0: Initial eccentric anomoly [rad]
    :param gamma: Angle of periastron advance [rad]
    :param gammadot: Time derivative of angle of periastron advance [rad/s]
    :param inc: Inclination angle [rad]

    :return splus, scross: plus and cross time-domain waveforms for a CGW
    
Calculate splus and scross for a CGW summed over all harmonics.
This waveform differs slightly from that in Taylor et al (2016)
in that it includes the time dependence of the advance of periastron.



:return splus, scross: plus and cross time-domain waveforms for a CGW
Calculate splus and scross for a CGW summed over all harmonics . This waveform differs slightly from that in Taylor et al ( 2016 ) in that it includes the time dependence of the advance of periastron . : return splus scross : plus and cross time - domain waveforms for a CGW
def calculate_splus_scross(nmax, mc, dl, h0, F, e, t, l0, gamma, gammadot, inc):
    n = np.arange(1, nmax)
    an = get_an(n, mc, dl, h0, F, e)
    bn = get_bn(n, mc, dl, h0, F, e)
    cn = get_cn(n, mc, dl, h0, F, e)
    omega = 2 * np.pi * F
    gt = gamma + gammadot * t
    lt = l0 + omega * t
    phase1 = n * np.tile(lt, (nmax - 1, 1)).T
    phase2 = np.tile(gt, (nmax - 1, 1)).T
    sinp1 = np.sin(phase1)
    cosp1 = np.cos(phase1)
    sinp2 = np.sin(2 * phase2)
    cosp2 = np.cos(2 * phase2)
    sinpp = sinp1 * cosp2 + cosp1 * sinp2
    cospp = cosp1 * cosp2 - sinp1 * sinp2
    sinpm = sinp1 * cosp2 - cosp1 * sinp2
    cospm = cosp1 * cosp2 + sinp1 * sinp2
    sp = sinpm / (n * omega - 2 * gammadot) + sinpp / (n * omega + 2 * gammadot)
    sm = sinpm / (n * omega - 2 * gammadot) - sinpp / (n * omega + 2 * gammadot)
    cp = cospm / (n * omega - 2 * gammadot) + cospp / (n * omega + 2 * gammadot)
    cm = cospm / (n * omega - 2 * gammadot) - cospp / (n * omega + 2 * gammadot)
    splus_n = -0.5 * (1 + np.cos(inc) ** 2) * (an * sp - bn * sm) + (1 - np.cos(inc) ** 2) * cn * sinp1
    scross_n = np.cos(inc) * (an * cm - bn * cp)
    return np.sum(splus_n, axis=1), np.sum(scross_n, axis=1)
def calculate_splus_scross ( nmax , mc , dl , h0 , F , e , t , l0 , gamma , gammadot , inc ) : n = np . arange ( 1 , nmax ) an = get_an ( n , mc , dl , h0 , F , e ) bn = get_bn ( n , mc , dl , h0 , F , e ) cn = get_cn ( n , mc , dl , h0 , F , e ) omega = 2 * np . pi * F gt = gamma + gammadot * t lt = l0 + omega * t phase1 = n * np . tile ( lt , ( nmax - 1 , 1 ) ) . T phase2 = np . tile ( gt , ( nmax - 1 , 1 ) ) . T sinp1 = np . sin ( phase1 ) cosp1 = np . cos ( phase1 ) sinp2 = np . sin ( 2 * phase2 ) cosp2 = np . cos ( 2 * phase2 ) sinpp = sinp1 * cosp2 + cosp1 * sinp2 cospp = cosp1 * cosp2 - sinp1 * sinp2 sinpm = sinp1 * cosp2 - cosp1 * sinp2 cospm = cosp1 * cosp2 + sinp1 * sinp2 sp = sinpm / ( n * omega - 2 * gammadot ) + sinpp / ( n * omega + 2 * gammadot ) sm = sinpm / ( n * omega - 2 * gammadot ) - sinpp / ( n * omega + 2 * gammadot ) cp = cospm / ( n * omega - 2 * gammadot ) + cospp / ( n * omega + 2 * gammadot ) cm = cospm / ( n * omega - 2 * gammadot ) - cospp / ( n * omega + 2 * gammadot ) splus_n = - 0.5 * ( 1 + np . cos ( inc ) ** 2 ) * ( an * sp - bn * sm ) + ( 1 - np . cos ( inc ) ** 2 ) * cn * sinp1 scross_n = np . cos ( inc ) * ( an * cm - bn * cp ) return np . sum ( splus_n , axis = 1 ) , np . sum ( scross_n , axis = 1 )
Calculate splus and scross for a CGW summed over all harmonics.
Calculate splus and scross for a CGW summed over all harmonics .
"""
    Calculate splus and scross for a CGW summed over all harmonics.
    This waveform differs slightly from that in Taylor et al (2016)
    in that it includes the time dependence of the advance of periastron.

    :param nmax: Total number of harmonics to use
    :param mc: Chirp mass of binary [Solar Mass]
    :param dl: Luminosity distance [Mpc]
    :param F: Orbital frequency of binary [Hz]
    :param e: Orbital Eccentricity
    :param t: TOAs [s]
    :param l0: Initial eccentric anomoly [rad]
    :param gamma: Angle of periastron advance [rad]
    :param gammadot: Time derivative of angle of periastron advance [rad/s]
    :param inc: Inclination angle [rad]

    :return splus, scross: plus and cross time-domain waveforms for a CGW
    """ # time dependent amplitudes # time dependent terms # tiled phase # intermediate terms
nmax
mc
dl
h0
F
e
t
l0
gamma
gammadot
inc