From 27324cb54958f6fb389f9567a91d7233731d2cba Mon Sep 17 00:00:00 2001 From: Sandy Yuan Date: Mon, 15 Jan 2024 15:38:25 -0800 Subject: [PATCH] fixed reseed and new vel bias --- abacusnbody/hod/abacus_hod.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abacusnbody/hod/abacus_hod.py b/abacusnbody/hod/abacus_hod.py index 7f217165..0571cfb0 100644 --- a/abacusnbody/hod/abacus_hod.py +++ b/abacusnbody/hod/abacus_hod.py @@ -564,7 +564,10 @@ def run_hod(self, tracers = None, want_rsd = True, want_nfw = False, NFW_draw = r2 = np.vstack((r20, r21, r22)).T r3 = mtg.random(size=len(self.particle_data['prandoms']), nthread=Nthread, dtype=np.float32) self.halo_data['hrandoms'] = r1 - self.halo_data['hveldev'] = r2*self.halo_data['hsigma3d']/np.sqrt(3) + if len(self.halo_data['hveldev'].shape) == 1: + self.halo_data['hveldev'] = r20*self.halo_data['hsigma3d']/np.sqrt(3) + else: + self.halo_data['hveldev'] = r2*self.halo_data['hsigma3d']/np.sqrt(3) self.particle_data['prandoms'] = r3 print("gen randoms took, ", time.time() - start)