From 72c083a9f2ca8d0679ce21b0fce18a0aabff7eb1 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 31 Jul 2017 22:10:56 +0800 Subject: utils/cosmology.py: Add "dVc()": differential comoving volume Signed-off-by: Aaron LI --- fg21sim/utils/cosmology.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fg21sim/utils/cosmology.py') diff --git a/fg21sim/utils/cosmology.py b/fg21sim/utils/cosmology.py index a3c8574..d66de09 100644 --- a/fg21sim/utils/cosmology.py +++ b/fg21sim/utils/cosmology.py @@ -295,3 +295,11 @@ class Cosmology: if self._growth_factor0 is None: self._growth_factor0 = self.growth_factor(0) return self._growth_factor0 + + def dVc(self, z): + """ + Calculate the differential comoving volume. + + The dimensions is [Mpc^3]/[sr]/[unit redshift]. + """ + return self._cosmo.differential_comoving_volume(z).value -- cgit v1.2.2