Skip to content

Commit

Permalink
fix: log10 in kpar log binning
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielaBreitman committed Aug 5, 2024
1 parent d3f5ddf commit a621b75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py21cmfast_tools/lc2ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def log_bin(ps, kperp, kpar, bins=None):
m = np.logical_and(kpar >= bins[i], kpar < bins[i + 1])
new_ps[:, i] = np.nanmean(ps[:, m], axis=1)
modes[i] = np.sum(m)
bin_centers = np.exp((np.log(bins[1:]) + np.log(bins[:-1])) / 2)
bin_centers = np.exp((np.log10(bins[1:]) + np.log10(bins[:-1])) / 2)
return new_ps, kperp, bin_centers, modes


Expand Down

0 comments on commit a621b75

Please sign in to comment.