Example #1
0
 def test_PSD(self):
     # Test the PSDs with observed GWs with dummy orbital periods and eccs
     PSD_dat = GW_calcs.LISA_PSD(BCM_DAT.mass_1, BCM_DAT.mass_2,
                                 BCM_DAT.porb, BCM_DAT.ecc, BCM_DAT.xGx,
                                 BCM_DAT.yGx, BCM_DAT.zGx, 10,
                                 4 * sec_in_year)
     self.assertAlmostEqual(np.sum(PSD_dat.PSD), PSD_SUM_TEST)
Example #2
0
    def LISA_obs(self, T_obs):
        """Computes the gravitational wave signal from the population
        that will be observable by LISA, including SNR and PSD according
        to the user input

        Parameters
        ----------
        realization : DataFrame
            Milky Way population realization of size n_samp
        T_obs : float
            LISA observation time in seconds

        Returns
        -------
        PSD_dat : DataFrame
            DataFrame containing the power spectral density for all systems
            in realization
        """
        # Compute the PSD
        #######################################################################
        PSD_dat = GW_calcs.LISA_PSD(self.realization.mass_1,
                                    self.realization.mass_2,
                                    10**self.realization.porb,
                                    self.realization.ecc, self.realization.xGx,
                                    self.realization.yGx, self.realization.zGx,
                                    150, T_obs)
        return PSD_dat
Example #3
0
    def LISA_full_obs(self, T_obs):
        """Computes the gravitational wave signal from the population
        that will be observable by LISA, including SNR and PSD according
        to the user input

        Parameters
        ----------
        realization : DataFrame
            Milky Way population realization of size n_samp
        T_obs : float
            LISA observation time in seconds

        Returns
        -------
        SNR_dat : DataFrame
            DataFrame containing signal to noise ratios for all systems
            in realization
        PSD_dat : DataFrame
            DataFrame containing the power spectral density for all systems
            in realization
        foreground_dat : DataFrame
            DataFrame containing power spectral density of the population
            over a set of frequency bins with width set by the LISA
            observation time
        """

        # Compute the PSD
        #######################################################################
        PSD_dat = GW_calcs.LISA_PSD(self.realization.mass_1,
                                    self.realization.mass_2,
                                    10**self.realization.porb,
                                    self.realization.ecc, self.realization.xGx,
                                    self.realization.yGx, self.realization.zGx,
                                    150, T_obs)
        # Compute the foreground from the PSD dataframe
        #######################################################################
        foreground_dat = GW_calcs.compute_foreground(PSD_dat, T_obs)

        LISA_plus_foreground = GW_calcs.LISA_combo(foreground_dat)

        # Compute the SNR
        #######################################################################
        SNR_dat = GW_calcs.LISA_SNR(
            self.realization.mass_1, self.realization.mass_2,
            10**self.realization.porb, self.realization.ecc,
            self.realization.xGx, self.realization.yGx, self.realization.zGx,
            150, T_obs, foreground_dat, LISA_plus_foreground)

        return SNR_dat, PSD_dat, foreground_dat