aboutsummaryrefslogtreecommitdiffstats
path: root/acispy
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-10-31 16:31:41 +0800
committerAaron LI <aly@aaronly.me>2017-10-31 16:31:41 +0800
commita1d4cb4b6d637112aa97249b8150e8236002f09f (patch)
tree16a927c90a230d857270c34cb8fa0d6ac2809107 /acispy
parentd1768c0e129b0e51d27277c1ad6608ca1c7246ae (diff)
downloadchandra-acis-analysis-a1d4cb4b6d637112aa97249b8150e8236002f09f.tar.bz2
bin/cosmo_calc.py: Add evolution factor -E/--evolution-factor
Diffstat (limited to 'acispy')
-rw-r--r--acispy/cosmo.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/acispy/cosmo.py b/acispy/cosmo.py
index 62b9191..4840122 100644
--- a/acispy/cosmo.py
+++ b/acispy/cosmo.py
@@ -1,8 +1,8 @@
-# Copyright (c) 2017 Weitian LI <liweitianux@live.com>
+# Copyright (c) 2017 Weitian LI <weitian@aaronly.me>
# MIT license
"""
-Cosmology calculator for Chandra ACIS.
+Cosmology calculator with Chandra ACIS-specific quantities support.
"""
import math
@@ -25,6 +25,9 @@ class Calculator:
self.Ob0 = Ob0
self._cosmo = FlatLambdaCDM(H0=H0, Om0=Om0, Ob0=Ob0)
+ def evolution_factor(self, z):
+ return self._cosmo.efunc(z)
+
def luminosity_distance(self, z, unit="Mpc"):
dist = self._cosmo.luminosity_distance(z)
return dist.to(au.Unit(unit)).value