aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-07-31 22:10:56 +0800
committerAaron LI <aly@aaronly.me>2017-07-31 22:10:56 +0800
commit72c083a9f2ca8d0679ce21b0fce18a0aabff7eb1 (patch)
tree167d151ef96a1ef717c52a1f582859897a216122
parent9929159a769e0575ff8654b840b4090c4495a8de (diff)
downloadfg21sim-72c083a9f2ca8d0679ce21b0fce18a0aabff7eb1.tar.bz2
utils/cosmology.py: Add "dVc()": differential comoving volume
Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r--fg21sim/utils/cosmology.py8
1 files changed, 8 insertions, 0 deletions
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