diff options
author | Aaron LI <aly@aaronly.me> | 2017-06-19 17:53:21 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-06-19 17:53:21 +0800 |
commit | a5bb6d615e92d80bac82a95177238c3ebf144dc7 (patch) | |
tree | d8768812e6f26ec88327085c8480ed3ffddc572a | |
parent | 8da5833dcb8365568673944afdea7d1a9c334bff (diff) | |
download | fg21sim-a5bb6d615e92d80bac82a95177238c3ebf144dc7.tar.bz2 |
utils/cosmology: Add methods DL() and DA()
-rw-r--r-- | fg21sim/utils/cosmology.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fg21sim/utils/cosmology.py b/fg21sim/utils/cosmology.py index 12e581a..906f7d8 100644 --- a/fg21sim/utils/cosmology.py +++ b/fg21sim/utils/cosmology.py @@ -75,6 +75,20 @@ class Cosmology: """ return self.H0 * self.E(z) + def DL(self, z): + """ + Luminosity distance at redshift z. + Unit: [Mpc] + """ + return self._cosmo.luminosity_distance(z).value + + def DA(self, z): + """ + Angular diameter distance at redshift z. + Unit: [Mpc] + """ + return self._cosmo.angular_diameter_distance(z).value + @property def hubble_time(self): """ |