Skip to content

Commit

Permalink
Updated runManager.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyuon committed Jul 25, 2024
1 parent 1ca2421 commit 227fc98
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/jimgw/single_event/runManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def sample(self):
def get_samples(self):
return self.jim.get_samples()

def plot_corner(self, path: str="corner.png", **kwargs):
def plot_corner(self, path: str="corner.jpeg", **kwargs):
"""
plot corner plot of the samples.
"""
Expand All @@ -383,7 +383,7 @@ def plot_corner(self, path: str="corner.png", **kwargs):
plt.savefig(path)
plt.close()

def plot_diagnostic(self, path: str="diagnostic.png", **kwargs):
def plot_diagnostic(self, path: str="diagnostic.jpeg", **kwargs):
"""
plot diagnostic plot of the samples.
"""
Expand All @@ -395,8 +395,7 @@ def plot_diagnostic(self, path: str="diagnostic.png", **kwargs):
axs = [plt.subplot(2, 2, i + 1) for i in range(4)]
plt.sca(axs[0])
plt.title("log probability")
for i in range(log_prob.shape[0]):
axs[0].plot(log_prob[i], linewidth=0.05)
plt.plot(log_prob.mean(0))
plt.xlabel("iteration")

plt.sca(axs[1])
Expand Down

0 comments on commit 227fc98

Please sign in to comment.