Ejemplo n.º 1
0
 def test_observed_volume_with_redshift_model(self):
     model = PowerLawRedshift()
     self.vt = vt.ResamplingVT(data=self.data, model=model, n_events=0)
     self.assertAlmostEqual(
         self.vt.surveyed_hypervolume(dict(lamb=4)),
         total_four_volume(lamb=4, analysis_time=1),
         4,
     )
Ejemplo n.º 2
0
 def test_four_volume(self):
     self.assertAlmostEqual(
         Planck15.comoving_volume(2.3).value / 1e9,
         redshift.total_four_volume(lamb=1,
                                    analysis_time=1,
                                    max_redshift=2.3),
         4,
     )
Ejemplo n.º 3
0
 def test_observed_volume_with_no_redshift_model(self):
     self.assertEqual(
         self.vt.surveyed_hypervolume(dict()),
         total_four_volume(lamb=0, analysis_time=1),
     )