Skip to content

Commit

Permalink
Ran pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosertoli committed Jul 18, 2023
1 parent 96fd802 commit 7a82385
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions indica/workflows/bayes_workflow.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from pathlib import Path
import time

import corner
import matplotlib.pyplot as plt
import numpy as np

import time
timestr = time.strftime("%Y%m%d%H%M")


def plot_profile(
profile,
blobkey: str,
Expand Down Expand Up @@ -61,9 +62,9 @@ def plot_profile(
return

if filename:
plt.savefig(figheader +timestr+ f"{filename}.png")
plt.savefig(figheader + timestr + f"{filename}.png")
else:
plt.savefig(figheader + timestr+f"{blobkey}.png")
plt.savefig(figheader + timestr + f"{blobkey}.png")
plt.close("all")


Expand Down Expand Up @@ -171,7 +172,7 @@ def plot_bayes_result(
plt.legend()
plt.xlabel("iterations")
plt.ylabel("auto-correlation time (iterations)")
plt.savefig(figheader + timestr+"average_tau.png")
plt.savefig(figheader + timestr + "average_tau.png")
plt.close()

key = "pi.brightness"
Expand Down Expand Up @@ -279,10 +280,10 @@ def plot_bayes_result(
)

corner.corner(samples, labels=param_names)
plt.savefig(figheader + timestr+"posterior.png")
plt.savefig(figheader + timestr + "posterior.png")

corner.corner(prior_samples, labels=param_names)
plt.savefig(figheader + timestr+"prior.png")
plt.savefig(figheader + timestr + "prior.png")
plt.close("all")


Expand Down

0 comments on commit 7a82385

Please sign in to comment.