def test_luminosity_redshift_with_cosmology(self): z = conversion.luminosity_distance_to_redshift(self.distances, cosmology='WMAP9') dl = conversion.redshift_to_luminosity_distance(z, cosmology='WMAP9') self.assertAlmostEqual(max(abs(dl - self.distances)), 0, 4)
def test_redshift_to_luminosity_distance(self): self.parameters['redshift'] = 1 dl = conversion.redshift_to_luminosity_distance( self.parameters['redshift']) self.bbh_convert() self.assertEqual(self.parameters['luminosity_distance'], dl)