Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hod tutorial: fix incorrect positional argument in run_hod() #160

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/hod.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ there. Here we show the scripts within ``run_hod.py`` for reference.::
newBall = AbacusHOD(sim_params, HOD_params, clustering_params)

# first hod run, slow due to compiling jit, write to disk
mock_dict = newBall.run_hod(newBall.tracers, want_rsd, write_to_disk, Nthread = 16)
mock_dict = newBall.run_hod(newBall.tracers, want_rsd, write_to_disk = write_to_disk, Nthread = 16)

# run the 10 different HODs for timing
for i in range(10):
Expand All @@ -207,7 +207,7 @@ redshift-space 2PCF (:math:`\xi(r_p, \pi)`): ::
pimax = clustering_params['pimax']
pi_bin_size = clustering_params['pi_bin_size'] # the pi binning is configrured by pi_max and bin size

mock_dict = newBall.run_hod(newBall.tracers, want_rsd, write_to_disk)
mock_dict = newBall.run_hod(newBall.tracers, want_rsd, write_to_disk=write_to_disk)
xirppi = newBall.compute_xirppi(mock_dict, rpbins, pimax, pi_bin_size)

Light Cones
Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/analysis/zcv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@
"source": [
"# Run hod\n",
"newBall = AbacusHOD(sim_params, HOD_params, clustering_params)\n",
"mock_dict = newBall.run_hod(newBall.tracers, want_rsd, write_to_disk, Nthread=16)\n",
"mock_dict = newBall.run_hod(\n",
" newBall.tracers, want_rsd, write_to_disk=write_to_disk, Nthread=16\n",
")\n",
"nobj = mock_dict['LRG']['mass'].size\n",
"print('number of galaxies', nobj)"
]
Expand Down
4 changes: 2 additions & 2 deletions scripts/hod/run_hod.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main(path2config):

# throw away run for jit to compile, write to disk
mock_dict = newBall.run_hod(
newBall.tracers, want_rsd, write_to_disk=False, Nthread=16
newBall.tracers, want_rsd, write_to_disk=write_to_disk, Nthread=16
)
# mock_dict = newBall.gal_reader()
start = time.time()
Expand All @@ -61,7 +61,7 @@ def main(path2config):
# print("alpha = ",newBall.tracers['LRG']['alpha'])
start = time.time()
mock_dict = newBall.run_hod(
newBall.tracers, want_rsd, write_to_disk, Nthread=64
newBall.tracers, want_rsd, write_to_disk=False, Nthread=64
)
print('Done hod, took time ', time.time() - start)
start = time.time()
Expand Down