From f9f7a6e672367639cf1c3c93513f1a5e7e01063b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 24 Jun 2017 21:52:41 +0800 Subject: halo.py: Add property "zgrid" as well as config option "zbinsize" --- fg21sim/extragalactic/clusters/halo.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fg21sim/extragalactic/clusters') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 3fbd50c..8895b3a 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -102,6 +102,14 @@ class HaloSingle: self.cosmo = Cosmology(H0=self.H0, Om0=self.OmegaM0) logger.info("Loaded and set up configurations") + @property + def zgrid(self): + """ + Redshift grid between 0 and ``self.zmax``. + """ + return np.arange(start=0.0, stop=self.zmax+self.zbinsize, + step=self.zbinsize) + @property def magnetic_field(self): """ -- cgit v1.2.2