diff --git a/abacusnbody/hod/GRAND_HOD.py b/abacusnbody/hod/GRAND_HOD.py index d38eaedc..64c13817 100644 --- a/abacusnbody/hod/GRAND_HOD.py +++ b/abacusnbody/hod/GRAND_HOD.py @@ -227,11 +227,11 @@ def gen_cent(pos, vel, mass, ids, multis, randoms, vdev, deltac, fenv, shear, if keep[i] == 1: # loop thru three directions to assign galaxy velocities and positions lrg_x[j1] = pos[i,0] - lrg_vx[j1] = vel[i,0] + alpha_c_L * vdev[i] # velocity bias + lrg_vx[j1] = vel[i,0] + alpha_c_L * vdev[i,0] # velocity bias lrg_y[j1] = pos[i,1] - lrg_vy[j1] = vel[i,1] + alpha_c_L * vdev[i] # velocity bias + lrg_vy[j1] = vel[i,1] + alpha_c_L * vdev[i,1] # velocity bias lrg_z[j1] = pos[i,2] - lrg_vz[j1] = vel[i,2] + alpha_c_L * vdev[i] # velocity bias + lrg_vz[j1] = vel[i,2] + alpha_c_L * vdev[i,2] # velocity bias # rsd only applies to the z direction if rsd and origin is not None: nx = lrg_x[j1] - origin[0] @@ -253,11 +253,11 @@ def gen_cent(pos, vel, mass, ids, multis, randoms, vdev, deltac, fenv, shear, elif keep[i] == 2: # loop thru three directions to assign galaxy velocities and positions elg_x[j2] = pos[i,0] - elg_vx[j2] = vel[i,0] + alpha_c_E * vdev[i] # velocity bias + elg_vx[j2] = vel[i,0] + alpha_c_E * vdev[i,0] # velocity bias elg_y[j2] = pos[i,1] - elg_vy[j2] = vel[i,1] + alpha_c_E * vdev[i] # velocity bias + elg_vy[j2] = vel[i,1] + alpha_c_E * vdev[i,1] # velocity bias elg_z[j2] = pos[i,2] - elg_vz[j2] = vel[i,2] + alpha_c_E * vdev[i] # velocity bias + elg_vz[j2] = vel[i,2] + alpha_c_E * vdev[i,2] # velocity bias # rsd only applies to the z direction if rsd and origin is not None: nx = elg_x[j2] - origin[0] @@ -279,11 +279,11 @@ def gen_cent(pos, vel, mass, ids, multis, randoms, vdev, deltac, fenv, shear, elif keep[i] == 3: # loop thru three directions to assign galaxy velocities and positions qso_x[j3] = pos[i,0] - qso_vx[j3] = vel[i,0] + alpha_c_Q * vdev[i] # velocity bias + qso_vx[j3] = vel[i,0] + alpha_c_Q * vdev[i,0] # velocity bias qso_y[j3] = pos[i,1] - qso_vy[j3] = vel[i,1] + alpha_c_Q * vdev[i] # velocity bias + qso_vy[j3] = vel[i,1] + alpha_c_Q * vdev[i,1] # velocity bias qso_z[j3] = pos[i,2] - qso_vz[j3] = vel[i,2] + alpha_c_Q * vdev[i] # velocity bias + qso_vz[j3] = vel[i,2] + alpha_c_Q * vdev[i,2] # velocity bias # rsd only applies to the z direction if rsd and origin is not None: nx = qso_x[j3] - origin[0] diff --git a/abacusnbody/hod/abacus_hod.py b/abacusnbody/hod/abacus_hod.py index bc5f1694..20e6c133 100644 --- a/abacusnbody/hod/abacus_hod.py +++ b/abacusnbody/hod/abacus_hod.py @@ -251,7 +251,7 @@ def staging(self): hid = np.empty([Nhalos_tot], dtype = int) hmultis = np.empty([Nhalos_tot]) hrandoms = np.empty([Nhalos_tot]) - hveldev = np.empty([Nhalos_tot]) + hveldev = np.empty((Nhalos_tot, 3)) hsigma3d = np.empty([Nhalos_tot]) hc = np.empty([Nhalos_tot]) hrvir = np.empty([Nhalos_tot]) @@ -536,12 +536,18 @@ def run_hod(self, tracers = None, want_rsd = True, want_nfw = False, NFW_draw = mtg = MTGenerator(np.random.PCG64(reseed)) r1 = mtg.random(size=len(self.halo_data['hrandoms']), nthread=Nthread, dtype=np.float32) if self.want_expvel: - rt = mtg.random(size=len(self.halo_data['hrandoms']), nthread=Nthread, dtype=np.float32) - r2 = np.zeros(len(rt), dtype=np.float32) + rt0 = mtg.random(size=len(self.halo_data['hrandoms']), nthread=Nthread, dtype=np.float32) + rt1 = mtg.random(size=len(self.halo_data['hrandoms']), nthread=Nthread, dtype=np.float32) + rt2 = mtg.random(size=len(self.halo_data['hrandoms']), nthread=Nthread, dtype=np.float32) + rt = np.vstack((rt0, rt1, rt2)).T + r2 = np.zeros((len(rt), 3), dtype=np.float32) r2[rt >= 0.5] = -np.log(2*(1-rt[rt >= 0.5])) r2[rt < 0.5] = np.log(2*rt[rt < 0.5]) else: - r2 = mtg.standard_normal(size=len(self.halo_data['hveldev']), nthread=Nthread, dtype=np.float32) + r20 = mtg.standard_normal(size=len(self.halo_data['hveldev']), nthread=Nthread, dtype=np.float32) + r21 = mtg.standard_normal(size=len(self.halo_data['hveldev']), nthread=Nthread, dtype=np.float32) + r22 = mtg.standard_normal(size=len(self.halo_data['hveldev']), nthread=Nthread, dtype=np.float32) + 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) diff --git a/abacusnbody/hod/prepare_sim.py b/abacusnbody/hod/prepare_sim.py index 1ff32658..108f4559 100644 --- a/abacusnbody/hod/prepare_sim.py +++ b/abacusnbody/hod/prepare_sim.py @@ -624,10 +624,10 @@ def prepare_slab(i, savedir, simdir, simname, z_mock, z_type, tracer_flags, MT, halos['npstartA'] = halos_pstart_new halos['npoutA'] = halos_pnum_new halos['randoms'] = np.random.random(len(halos)) # attaching random numbers - halos['randoms_exp'] = (np.random.randint(0, 2, size = len(halos))*2-1)\ - *np.random.exponential(scale = halos["sigmav3d_L2com"]/np.sqrt(3), size = len(halos)) # attaching random numbers + halos['randoms_exp'] = (np.random.randint(0, 2, size = (len(halos), 3))*2-1)\ + *np.random.exponential(scale = np.repeat(halos["sigmav3d_L2com"], 3).reshape((-1, 3))/np.sqrt(3), size = (len(halos), 3)) # attaching random numbers halos['randoms_gaus_vrms'] = np.random.normal(loc = 0, - scale = halos["sigmav3d_L2com"]/np.sqrt(3), size = len(halos)) # attaching random numbers + scale = np.repeat(halos["sigmav3d_L2com"], 3).reshape((-1, 3))/np.sqrt(3), size = (len(halos), 3)) # attaching random numbers # output halo file print("outputting new halo file ") diff --git a/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/galaxies_rsd/ELGs.dat b/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/galaxies_rsd/ELGs.dat index c253086d..0366932f 100644 --- a/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/galaxies_rsd/ELGs.dat +++ b/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/galaxies_rsd/ELGs.dat @@ -20,4 +20,4 @@ x y z vx vy vz mass id -989.9779939780151 2595.872235514386 174.58946130616962 279.78515625 405.76171875 682.470703125 594760988767.7638 1364044 -989.8491016637607 2700.924001600403 128.59961886324763 192.24267578125 -99.3597640991211 -54.88894271850586 4730669850376.221 1374058 -989.9346596474115 2712.400836645169 79.9785797238952 346.61865234375 -133.11767578125 -166.9921875 491415994265.56366 1375036 --989.411052509211 2702.3862712400905 129.18043285068367 17.578125 143.5 -284.125 2389589362673.3203 1374059 +-989.8232582237715 2546.1908703460344 572.2576660921198 618.0 278.25 -720.5 15543930805739.074 1360581 diff --git a/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 index 2f3015aa..f8c62a67 100644 Binary files a/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 index 4ffe8312..1a74d23d 100644 Binary files a/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/AbacusSummit_base_c000_ph001-abridged/z2.250/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/ELGs.dat b/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/ELGs.dat index 3efc3bd4..d129fe64 100644 --- a/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/ELGs.dat +++ b/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/ELGs.dat @@ -19,7 +19,7 @@ x y z vx vy vz mass id -14.51835823059082 7.931110382080078 -3.584781303405762 163.04673767089844 139.01560974121094 56.981407165527344 1153534123340.0 110005000000 -15.496166229248047 10.945652961730957 -2.720741901397705 207.01663208007812 184.14505004882812 139.6011199951172 642061446010.0 120005000000 -14.402153015136719 12.416088104248047 -5.1643526649475096 169.70962524414062 171.3517608642578 253.3010711669922 565884664280.0 130003000000 --11.723433494567871 -15.79758071899414 0.28377065658569345 149.74217224121094 -1.9829565286636353 -256.9563293457031 2883835308350.0 100000008000000 +-11.723433494567871 -15.79758071899414 0.2837706565856933 149.74217224121094 -1.9829565286636353 -256.9563293457031 2883835308350.0 100000008000000 -13.297053337097168 -13.044370651245117 -2.180264949798584 157.18418884277344 -188.30552673339844 251.63612365722656 1164416520730.0 100010005000000 -12.671599388122559 -10.362853050231934 -5.708838672637939 114.60912322998047 -172.80517578125 27.945545196533203 750885419910.0 100020004000000 -13.626067161560059 -3.7235212326049805 6.224752807617188 -7.58872127532959 -42.44635009765625 -126.14227294921875 968533367710.0 100050010000000 @@ -28,31 +28,31 @@ x y z vx vy vz mass id -13.718157768249512 11.00837230682373 -3.6717508316040037 213.04156494140625 82.03125 -181.470947265625 1022945354660.0 100120006000000 -13.592602729797363 14.086950302124023 -4.613870429992676 184.3946533203125 116.6330795288086 356.114501953125 772650214690.0 100140003000000 -11.148972511291504 -15.498797416687012 -4.390919952392578 791.3343505859375 -116.67435455322266 27.26866912841797 10327395123110.0 200000004000001 --9.196588516235352 -15.937725067138672 -3.9100983047485354 -226.09007263183594 410.1698913574219 74.37532043457031 707355830350.0 200000004000003 --9.316675186157227 -15.283766746520996 -1.5695453834533692 -633.298828125 -176.55628967285156 318.1910400390625 446178292990.0 200000004000005 +-9.196588516235352 -15.937725067138672 -3.910098304748535 -226.09007263183594 410.1698913574219 74.37532043457031 707355830350.0 200000004000003 +-9.316675186157227 -15.283766746520996 -1.569545383453369 -633.298828125 -176.55628967285156 318.1910400390625 446178292990.0 200000004000005 -9.933526039123535 -10.896464347839355 -4.217310638427734 -109.54805755615234 -409.285888671875 120.2506332397461 1458241250260.0 200020004000001 -11.547629356384277 -4.2686662673950195 -9.165989227294922 5.6149468421936035 -115.52357482910156 216.5851287841797 816179804250.0 200050002000000 -9.703001976013184 -3.0016324520111084 -2.634219989776611 85.74483489990234 -73.37793731689453 -54.67475509643555 587649459060.0 200060006000000 --10.122016906738281 1.7329100370407104 -1.8345533752441407 79.85171508789062 4.65559196472168 -58.8455810546875 4157075802980.0 200080006000000 +-10.122016906738281 1.7329100370407104 -1.8345533752441405 79.85171508789062 4.65559196472168 -58.8455810546875 4157075802980.0 200080006000000 -9.968084335327148 3.094167709350586 3.904859752655029 62.15882873535156 16.563215255737305 -181.44810485839844 772650214690.0 200080010000000 -9.952048301696777 10.709346771240234 -3.5124417972564697 -30.543163299560547 291.2341003417969 -75.7087631225586 489707882550.0 200120006002000 -9.49063777923584 12.817178726196289 -4.938613986968994 -349.93487548828125 380.54376220703125 -85.51593780517578 1523535634600.0 200130005003000 -9.00098991394043 -10.96568489074707 -3.576101825237274 138.56336975097656 -133.7097625732422 -277.8128967285156 750885419910.0 300020007000000 -8.72246265411377 -3.7697997093200684 -3.1893835258483887 37.34700393676758 -31.74207305908203 -121.53964233398438 1665006800670.0 300050006002000 -8.693653106689453 8.429630279541016 -2.758038376569748 252.8817901611328 75.3807373046875 -321.4716796875 881474188590.0 300110007001000 --7.5774922370910645 7.979973793029785 -0.8144911384582518 41.3096923828125 -35.70994567871094 -297.7195129394531 3177660037880.0 300110008000000 +-7.5774922370910645 7.979973793029785 -0.814491138458252 41.3096923828125 -35.70994567871094 -297.7195129394531 3177660037880.0 300110008000000 -8.890106201171875 9.957396507263184 -4.037821998596192 169.58604431152344 245.51553344726562 225.28855895996094 1697653992840.0 300120004000000 -9.220510482788086 12.872040748596191 -5.769790768623352 -26.419090270996094 48.67900848388672 -399.4720458984375 729120625130.0 300130006001000 -8.76818561553955 15.815776824951172 2.16959602355957 77.00643920898438 -8.378704071044922 -246.6212921142578 576767061670.0 300140009001000 --7.466480255126953 15.310609817504883 7.514066085815429 37.88462829589844 29.308778762817383 -120.08482360839844 1991478722370.0 300140011000000 +-7.466480255126953 15.310609817504883 7.51406608581543 37.88462829589844 29.308778762817383 -120.08482360839844 1991478722370.0 300140011000000 -5.939600467681885 2.3130478858947754 -6.070600051879882 99.66493225097656 52.639793395996094 173.86021423339844 990298162490.0 400080003001000 -7.289783477783203 6.100117206573486 -5.572191200256348 166.01055908203125 168.39495849609375 143.13040161132812 968533367710.0 400100004000000 -6.96325159072876 14.966787338256836 0.7407073783874512 -20.088083267211914 50.28932571411133 -250.4546661376953 3014424077030.0 400140008000000 -4.8576340675354 -9.931912422180176 -2.0411104583740234 151.24803161621094 -125.21568298339844 306.2204895019531 489707882550.0 500020005000000 -4.671352863311768 -11.455158233642578 -6.908011083602905 283.1856384277344 -157.54270935058594 -317.6852111816406 380883908650.0 500020005002000 -4.99878454208374 -3.2018752098083496 3.0143338012695313 67.93506622314453 -23.253684997558594 -170.93447875976562 816179804250.0 500050009001000 --4.76817512512207 8.749960899353027 -6.536458950042725 -301.1524963378906 196.49510192871094 91.36824798583984 1937066735420.0 500110003000000 --4.458686828613281 13.64990234375 -6.367664394378663 -113.60659790039062 59.15117263793945 -154.76976013183594 565884664280.0 500130005001000 +-4.76817512512207 8.749960899353027 -6.536458950042724 -301.1524963378906 196.49510192871094 91.36824798583984 1937066735420.0 500110003000000 +-4.458686828613281 13.64990234375 -6.367664394378662 -113.60659790039062 59.15117263793945 -154.76976013183594 565884664280.0 500130005001000 -2.5271100997924805 -15.016393661499023 -4.80699912071228 -62.35439682006836 272.1480712890625 -3.0486021041870117 979415765100.0 600000005001000 -2.1237425804138184 -9.359868049621582 -9.414025459289551 42.20768737792969 -120.63050079345703 -631.5990600585938 2198244272780.0 600020006000000 -2.2788007259368896 1.8965433835983276 1.831328077316284 -126.98192596435547 16.524229049682617 -175.84820556640625 500590279940.0 600080009000000 @@ -69,12 +69,12 @@ x y z vx vy vz mass id 0.4158208668231964 -1.7427817583084106 10.610767669677735 -34.116798400878906 -123.81771850585938 -52.90314483642578 642061446010.0 700060012000000 -0.7558362483978271 0.8292347192764282 6.154626750946045 -55.465240478515625 -59.2318115234375 -97.93697357177734 1980596324980.0 700070010000000 1.0874981880187988 2.6616625785827637 -4.708214206695557 4.638670921325684 -76.17894744873047 -163.03500366210938 533237472110.0 700080005000000 -1.1365690231323242 5.930782794952393 -8.686026458740233 -116.44389343261719 -38.84065628051758 134.87025451660156 935886175540.0 700100002001000 +1.1365690231323242 5.930782794952393 -8.686026458740235 -116.44389343261719 -38.84065628051758 134.87025451660156 935886175540.0 700100002001000 -0.49693718552589417 5.662851810455322 12.60552900314331 -32.676551818847656 6.379591464996338 22.497766494750977 729120625130.0 700100013000000 -0.3185131251811981 8.066765785217285 -7.381932010650635 -49.46342849731445 105.12274169921875 58.02314376831055 892356585980.0 700110003001000 0.06823333352804184 11.536266326904297 -5.529072666168213 -24.07335662841797 183.6951904296875 -8.695640563964844 718238227740.0 700120004000000 -0.2842399477958679 11.05790901184082 10.33816822052002 79.59639739990234 11.318110466003418 -72.54790496826172 435295895600.0 700120012002000 -2.5904433727264404 -14.69328784942627 -3.0558535909652713 -111.98018646240234 111.79598236083984 -116.86700439453125 1001180559880.0 800000006000000 +2.5904433727264404 -14.69328784942627 -3.055853590965271 -111.98018646240234 111.79598236083984 -116.86700439453125 1001180559880.0 800000006000000 2.7262160778045654 -12.993206024169922 -4.269969787597656 -265.52667236328125 -52.42788314819336 -74.79437255859375 685591035570.0 800010005000000 1.4444551467895508 -7.280479431152344 -3.398507080078125 -201.20632934570312 -25.58744239807129 93.09358978271484 1730301185010.0 800040005001000 1.5122003555297852 2.700745105743408 -5.823624687194824 -83.36663055419922 -108.37003326416016 90.50883483886719 794415009470.0 800080004000000 @@ -83,7 +83,7 @@ x y z vx vy vz mass id 3.046112537384033 13.292448043823242 -4.33986047744751 -264.16534423828125 172.48135375976562 97.98287963867188 522355074720.0 800130004000000 1.3172047138214111 12.57468318939209 8.094191131591797 -22.33595848083496 23.31026268005371 -97.84140014648438 848826996420.0 800130011000000 5.131485939025879 -11.601445198059082 1.1084141635894775 -56.54134750366211 -86.17334747314453 -101.41637420654297 968533367710.0 900010008002000 -5.596229076385498 -8.624361991882324 -3.931888313293457 -96.07770538330078 -7.759613513946533 82.681396484375 3895898265620.0 900030005000000 +5.596229076385498 -8.624361991882324 -3.9318883132934572 -96.07770538330078 -7.759613513946533 82.681396484375 3895898265620.0 900030005000000 4.807375907897949 0.20375189185142517 -5.625345191955566 -94.56612396240234 -113.05360412597656 136.38754272460938 1012062957270.0 900070004000000 4.043700695037842 7.680980682373047 -4.109910163879395 -138.4853515625 -18.757539749145508 -143.30331420898438 500590279940.0 900110006000000 3.8049867153167725 12.000171661376953 -8.302328567504883 -79.28042602539062 15.372339248657227 266.00909423828125 946768572930.0 900130002000000 @@ -92,14 +92,14 @@ x y z vx vy vz mass id 5.6139702796936035 -11.903861999511719 -6.226984252929688 -21.134416580200195 -4.354462146759033 234.93707275390625 925003778150.0 1000010003001000 5.989441871643066 -9.15694808959961 2.9907214736938474 -19.981611251831055 -116.09149932861328 -101.1829605102539 467943087770.0 1000030009000000 6.635930061340332 -6.814817905426025 -4.317118129730225 -108.96880340576172 86.7453842163086 46.05131530761719 859709393810.0 1000040005000000 -6.949442386627197 -4.154832363128662 -6.179595603942872 -61.90947341918945 -80.43289184570312 -178.2292022705078 979415765100.0 1000050005000000 +6.949442386627197 -4.154832363128662 -6.179595603942871 -61.90947341918945 -80.43289184570312 -178.2292022705078 979415765100.0 1000050005000000 5.784037113189697 -0.35819578170776367 -12.737131843566894 -79.0937271118164 -57.00947570800781 139.55557250976562 522355074720.0 1000070000000000 5.523092746734619 2.411149740219116 -7.76791862487793 -88.7691421508789 -29.65597152709961 110.11705017089844 1153534123340.0 1000080003000000 -7.383076190948486 2.204963207244873 -4.6801070117950445 -64.38322448730469 -52.118839263916016 -128.2375946044922 740003022520.0 1000080005000000 +7.383076190948486 2.204963207244873 -4.680107011795044 -64.38322448730469 -52.118839263916016 -128.2375946044922 740003022520.0 1000080005000000 5.5487961769104 5.996278762817383 -14.577242660522462 -88.5879898071289 -33.342464447021484 148.77349853515625 1207946110290.0 1000100000000000 -7.098642826080322 6.667464733123779 -3.3860002994537357 -84.26561737060547 3.1188292503356934 -107.49095916748047 620296651230.0 1000100006001000 +7.098642826080322 6.667464733123779 -3.3860002994537353 -84.26561737060547 3.1188292503356934 -107.49095916748047 620296651230.0 1000100006001000 6.831480026245117 14.161846160888672 -3.619131031036377 -129.2847137451172 146.4857940673828 60.2572021484375 783532612080.0 1000140005000000 -6.051450729370117 14.329913139343262 0.24700262546539298 -95.96175384521484 198.39634704589844 -133.37265014648438 1055592546830.0 1000140008000000 +6.051450729370117 14.329913139343262 0.24700262546539303 -95.96175384521484 198.39634704589844 -133.37265014648438 1055592546830.0 1000140008000000 7.775051116943359 -14.846220016479492 -3.1207962226867676 -67.46175384521484 70.68994903564453 -15.21263313293457 1207946110290.0 1100000006000000 9.0003080368042 -11.110405921936035 4.277978134155274 -191.34628295898438 -35.54996109008789 -128.17657470703125 881474188590.0 1100020010000000 9.356839179992676 -9.297951698303223 1.4536496353149413 -80.66883850097656 15.704920768737793 -117.1494369506836 2328833041460.0 1100030008000000 @@ -112,18 +112,35 @@ x y z vx vy vz mass id 12.17408275604248 -7.022722244262695 -4.528275737762451 52.645599365234375 -51.98377227783203 -250.9248504638672 609414253840.0 1300040006000000 12.386329650878906 -5.170563697814941 0.4269035673141479 -21.181764602661133 -115.7461166381836 -145.6400909423828 2100302696270.0 1300040008000000 -15.96170425415039 -13.58110523223877 -6.872355613708496 224.8917999267578 -55.80312728881836 -198.4420928955078 805297406860.0 1400010005001000 -14.235092163085938 -5.254249572753906 -4.7663245773315435 -38.438072204589844 -184.15138244628906 202.5418701171875 892356585980.0 1400040004000000 +14.235092163085938 -5.254249572753906 -4.766324577331543 -38.438072204589844 -184.15138244628906 202.5418701171875 892356585980.0 1400040004000000 14.469467163085938 -1.9040683507919312 -15.379054603576659 19.848947525024414 -100.27149963378906 99.04512786865234 576767061670.0 1400060014000000 15.555224418640137 0.5220844745635986 -2.7185896682739257 86.30542755126953 -96.33610534667969 -172.35211181640625 1436476455480.0 1400070006000000 -15.874872207641602 -0.27219611406326294 8.004806098937989 80.75609588623047 -11.46228313446045 -58.701271057128906 1022945354660.0 1400070011000000 15.293803215026855 2.8918581008911133 -3.0034103107452395 56.40514373779297 -68.89611053466797 -25.464412689208984 1153534123340.0 1400080006000000 15.901444435119629 15.523130416870117 -3.935301103591919 285.6259460449219 181.75247192382812 -21.644596099853516 576767061670.0 1400140005000000 --15.246111869812012 -12.344832420349121 -2.6307897567749023 190.4296875 257.8125 249.0234375 4167958200370.0 10005001000 --9.847359657287598 -15.72374439239502 -6.088714122772217 -216.796875 67.3828125 -140.625 113372816009020.0 200000004000000 --9.949919700622559 -10.91759967803955 -3.584169864654541 -152.34375 -480.46875 181.640625 1458241250260.0 200020004000001 --4.931519985198975 6.561471939086914 -4.537506103515625 -216.796875 234.375 260.7421875 3612955933480.0 500100004000000 --4.75980806350708 10.89737606048584 -6.099099159240723 231.4453125 76.171875 284.1796875 6932087137430.0 500120003000000 --2.2871038913726807 -9.661888122558594 -4.004379749298096 -205.078125 143.5546875 67.3828125 89137717021490.0 600020004000000 -0.15091200172901154 -3.571647882461548 15.306100845336914 196.2890625 -29.296875 70.3125 3841486278670.0 700050014000000 -8.730976104736328 -7.457119941711426 12.538071632385254 67.3828125 -61.5234375 -134.765625 4472665327290.0 1100030013000000 -12.349023818969727 -6.329343795776367 0.3184299468994142 231.4453125 -284.1796875 583.0078125 6681791997460.0 1300040004000000 +-13.289983749389648 2.2354559898376465 5.957973003387451 360.3515625 55.6640625 -90.8203125 4701195672480.0 100080010000000 +-9.942655563354492 -15.880352020263672 -5.671970844268799 111.328125 -486.328125 -117.1875 113372816009020.0 200000004000000 +-10.809151649475098 -15.911456108093262 -5.967304229736328 -14.6484375 93.75 -134.765625 113372816009020.0 200000004000000 +-10.061663627624512 15.991519927978516 -6.071595668792725 292.96875 228.515625 -146.484375 113372816009020.0 200000004000000 +-9.959712028503418 15.81481647491455 -6.167383193969727 234.375 881.8359375 -131.8359375 113372816009020.0 200000004000000 +-10.014495849609375 15.530464172363281 -4.146609783172607 35.15625 -178.7109375 46.875 113372816009020.0 200000004000000 +-9.535136222839355 -15.884480476379395 -3.0497074127197266 430.6640625 -577.1484375 175.78125 113372816009020.0 200000004000000 +-9.853759765625 14.793343544006348 -8.270562171936035 -43.9453125 875.9765625 -328.125 21057438949650.0 200000004000002 +-8.28003215789795 -9.957632064819336 -5.003454685211182 -164.0625 -372.0703125 111.328125 2709716950110.0 300020004000000 +-5.780640125274658 12.169055938720703 -2.396367073059082 -483.3984375 99.609375 647.4609375 18217133230860.0 400120003000000 +-3.690239906311035 -11.683551788330078 -2.9769768714904785 184.5703125 290.0390625 158.203125 11546223630790.0 500010005000000 +-2.378848075866699 -10.013855934143066 -9.952719688415527 -524.4140625 240.234375 -480.46875 89137717021490.0 600020004000000 +-2.274143934249878 -9.296223640441895 -4.194736480712891 632.8125 665.0390625 52.734375 89137717021490.0 600020004000000 +-2.1835200786590576 -9.202783584594727 3.1767830848693848 70.3125 -164.0625 747.0703125 89137717021490.0 600020004000000 +-1.91103994846344 3.537760019302368 -1.0530956387519836 17.578125 -149.4140625 -79.1015625 2143832285830.0 600090007000000 +-0.35129600763320923 -3.385215997695923 -13.629737854003906 76.171875 234.375 181.640625 1817360364130.0 700050000001000 +0.40799999237060547 -4.085728168487549 -4.742704391479492 -213.8671875 96.6796875 319.3359375 2970894487470.0 700050003000000 +1.0244799852371216 -4.320064067840576 -4.744637489318848 205.078125 -814.453125 61.5234375 9881216830120.0 700050004000000 +3.274303913116455 -14.742207527160645 4.4335222244262695 234.375 178.7109375 114.2578125 7215029469570.0 800000008000000 +2.2193920612335205 -3.334752082824707 -1.2022666931152344 210.9375 -231.4453125 339.84375 4015604636910.0 800050005000000 +2.59500789642334 -1.3323520421981812 -4.824908256530762 149.4140625 -489.2578125 -41.015625 8553564348540.0 800060005000000 +5.8284478187561035 -14.30726432800293 3.406728744506836 35.15625 23.4375 -131.8359375 13145936047120.0 900000009001000 +9.458720207214355 -6.962368011474609 2.4301631450653076 -102.5390625 -219.7265625 -96.6796875 7791796531240.0 1100030009000000 +14.83135986328125 -8.420096397399902 -1.9180989265441895 43.9453125 -723.6328125 257.8125 28664234725260.0 1400030005000000 +15.219584465026855 -3.111072063446045 2.6929895877838135 -158.203125 -146.484375 -61.5234375 7748266941680.0 1400050008000000 +-15.85308837890625 0.3648959994316101 11.473132133483887 187.5 123.046875 146.484375 1991478722370.0 1400070012000000 diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/LRGs.dat b/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/LRGs.dat index 3c1df871..015d909f 100644 --- a/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/LRGs.dat +++ b/tests/ref_hod/Mini_N64_L32/z0.000/galaxies_rsd/LRGs.dat @@ -17,9 +17,7 @@ x y z vx vy vz mass id -10.116243362426758 15.986204147338867 -3.991608905792236 21.652971267700195 -36.7679328918457 62.8034782409668 113372816009020.0 200000004000000 -10.054981231689453 14.843656539916992 -6.802307395935059 59.38576889038086 774.992919921875 -205.86903381347656 21057438949650.0 200000004000002 -9.820068359375 -11.208837509155273 -3.8385841178894045 120.56236267089844 -219.26451110839844 201.10247802734375 11197986914310.0 200020004000000 --5.8185882568359375 12.296954154968262 -5.730250625610351 35.3411865234375 51.90985107421875 307.4423522949219 18217133230860.0 400120003000000 +-5.8185882568359375 12.296954154968262 -5.730250625610352 35.3411865234375 51.90985107421875 307.4423522949219 18217133230860.0 400120003000000 -2.2077879905700684 -9.597530364990234 -4.5027414989471435 -10.01099681854248 -50.52813720703125 14.57336711883545 89137717021490.0 600020004000000 5.933405876159668 -4.835461139678955 -3.5339558601379393 -57.67539596557617 -31.752958297729492 152.32574462890625 7574148583440.0 1000050004000000 14.92094898223877 -8.215825080871582 -4.828529033660889 -26.246870040893555 -41.75486755371094 -13.62411117553711 28664234725260.0 1400030005000000 --10.061663627624512 15.991519927978516 -6.071595668792725 292.96875 228.515625 -146.484375 113372816009020.0 200000004000000 --2.658751964569092 -9.830623626708984 -7.5551862716674805 -29.296875 -272.4609375 -275.390625 89137717021490.0 600020004000000 diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 index f7664ad5..9f5d8c31 100644 Binary files a/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 index 772e4cd8..bb58f5a3 100644 Binary files a/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 index af4da546..5c6b41d9 100644 Binary files a/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/Mini_N64_L32/z0.000/halos_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 index 96b02cd6..dc3b75db 100644 Binary files a/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_0_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 index 9169777d..70394f2e 100644 Binary files a/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_1_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 b/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 index 022057fd..089212e3 100644 Binary files a/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 and b/tests/ref_hod/Mini_N64_L32/z0.000/particles_xcom_2_seed600_abacushod_oldfenv_MT_new.h5 differ diff --git a/tests/test_hod.py b/tests/test_hod.py index f692bba5..0d6d85d8 100644 --- a/tests/test_hod.py +++ b/tests/test_hod.py @@ -6,7 +6,7 @@ To run the tests, use: $ pytest tests/test_hod.py -To generate new reference, run: +To generate new reference, run with reference_mode = True: $ python tests/test_hod.py from base directory """