Пример #1
0
        def integrand(theta, phi, psi):
            f_plus_2 = utils.F_plus_squared(theta=theta, phi=phi, psi=psi)
            intgl1 = 1 / (4 * np.pi) * (1 /
                                        (2 * np.pi)) * f_plus_2 * np.sin(theta)

            f_cross_2 = utils.F_cross_squared(theta=theta, phi=phi, psi=psi)
            intgl2 = 1 / (4 *
                          np.pi) * (1 /
                                    (2 * np.pi)) * f_cross_2 * np.sin(theta)

            intgl = intgl1 + intgl2
            return intgl
Пример #2
0
        def integrand2(theta, phi, psi, inc):
            f_plus_2 = utils.F_plus_squared(theta=theta, phi=phi, psi=psi)
            a_plus_2 = (1 / 4) * (1 + np.cos(inc)**2)**2
            intgl1 = 1 / (4 * np.pi) * (1 / (2 * np.pi)) * f_plus_2 * np.sin(
                theta) * a_plus_2 * np.sin(inc)

            f_cross_2 = utils.F_cross_squared(theta=theta, phi=phi, psi=psi)
            a_cross_2 = np.cos(inc)**2
            intgl2 = 1 / (4 * np.pi) * (1 / (2 * np.pi)) * f_cross_2 * np.sin(
                theta) * a_cross_2 * np.sin(inc)

            return intgl1 + intgl2
Пример #3
0
    def test_modulation_face_on(self):
        """Make sure that the modulation is consistent for edge on binaries"""
        dist = 100 * u.parsec
        inclination = np.pi / 2 * u.rad
        polarization = 0.0 * u.rad
        lat = np.pi / 2 * u.rad
        lon = np.pi / 2 * u.rad

        position = SkyCoord(lat=lat, lon=lon, distance=dist, frame='heliocentrictrueecliptic')

        # the 4/5 here is because we undo the total averaging in the modulation
        mod = 4 / 5 * strain.amplitude_modulation(position, polarization, inclination)

        F_plus_squared = utils.F_plus_squared(theta=lat, phi=lon, psi=polarization)

        self.assertEqual(mod, F_plus_squared / 2)
Пример #4
0
def amplitude_modulation(position, polarisation, inclination):
    """Computes the modulation of the strain due to the orbit averaged response of the detector to the
    position, polarisation, and inclination of the source

    Note that since the majority of the calculations in LEGWORK are carried out for the full position,
    polarisation, and inclination averages, we include a pre-factor of 5/4 on the amplitude modulation
    to undo the factor of 4/5 which arises from the averaging of :meth:`legwork.utils.F_plus_squared` and
    :meth:`legwork.utils.F_cross_squared`.

    Parameters
    ----------
    position : `SkyCoord/array`, optional
        Sky position of source. Must be specified using Astropy's :class:`astropy.coordinates.SkyCoord` class.

    polarisation : `float/array`, optional
        GW polarisation angle of the source. Must have astropy angular units.

    inclination : `float/array`, optional
        Inclination of the source. Must have astropy angular units.

    Returns
    -------
    modulation : `float/array`
        modulation to apply to strain from detector response
    """
    theta, phi = position.lat, position.lon
    a_plus = (1 + np.cos(inclination)**2)
    a_cross = 2 * np.cos(inclination)
    term1 = a_plus**2 * utils.F_plus_squared(theta, phi, polarisation)
    term2 = a_cross**2 * utils.F_cross_squared(theta, phi, polarisation)

    # The modulation first undoes the averaging with the 5/4 factor
    # This is because the full averaged response is 4/5
    modulation = 5 / 4 * 1 / 2 * (term1 + term2)

    return modulation