Skip to content

Commit

Permalink
Merge pull request #46 from andrea-mitridate/fix/plotting-index-error
Browse files Browse the repository at this point in the history
Fix plotting index error
  • Loading branch information
andrea-mitridate authored Jan 4, 2024
2 parents 3d1d28b + 2f0d1c4 commit 565bc1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ exclude = [

[tool.poetry]
name = "PTArcade"
version = "0.1.7"
version = "0.1.8"
description = "PTArcade provides an interface to the ENTERPRISE analysis suite and allows for simple implementation of new-physics searches in PTA data."
readme = "README.md"
authors = ["Andrea Mitridate <[email protected]>",]
Expand Down Expand Up @@ -133,7 +133,7 @@ natpy = "^0.1.1"
numpy = "^1.24.3"
pandas = "^2.0.2"
pyarrow = "^12.0.0"
getdist = "^1.4.3"
getdist = "^1.4.6"
astroml = "^1.0.2.post1"
scipy = "^1.10.1"
setuptools = "^67.8.0"
Expand Down
2 changes: 1 addition & 1 deletion src/ptarcade/chains_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ def get_max_pos(params: list[str],

density = MCSamples.get1DDensity(sample, par, normalized=False)

mind = lambda x: -density(x)[0]
mind = lambda x: -density(x)
if not bounds:
x = minimize(mind, np.array(bayes_est.get(par)[0]))
x0 = x.x
Expand Down
4 changes: 2 additions & 2 deletions src/ptarcade/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,10 @@ def plot_hpi(
ax = plot.get_axes_for_params(par)

if x1:
p1 = density(x1)[0]
p1 = density(x1)
ax.plot([x1, x1], [0, p1], ls = 'dashed', color = colors[idx+c_adjust], lw=lw)
if x2:
p2 = density(x2)[0]
p2 = density(x2)
ax.plot([x2, x2], [0, p2], ls = 'dashed', color = colors[idx+c_adjust], lw=lw)

return
Expand Down

0 comments on commit 565bc1c

Please sign in to comment.