Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/LouConreux/lute into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LouConreux committed Nov 25, 2024
2 parents a39f02a + 9ee9a45 commit c501937
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lute/tasks/geom_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ def bayes_opt_geom(
self.min_intensity(powder)

if self.rank == 0:
logger.info(f"Optimizing geometry for exp {self.exp} run {self.run} with {self.det_type} detector")
logger.info(
f"Optimizing geometry for exp {self.exp} run {self.run} with {self.det_type} detector"
)
logger.info(f"Number of distances to scan: {self.size}")
self.bounds = bounds
distances = np.linspace(bounds["dist"][0], bounds["dist"][1], self.size)
Expand Down Expand Up @@ -537,7 +539,7 @@ def finalize(self):
logger.info(f"Score Std Dev: {std_dev:.2e}")
logger.info(f"10th Score Percentile: {percentile_10:.2e}")
peaks, _ = find_peaks(self.scan["score"], height=percentile_10)
min_idx = np.argmin(self.scan["residual"][peaks])
min_idx = np.argmin(self.scan["residual"][peaks])
index = peaks[min_idx]
self.index = peaks[min_idx]
self.bo_history = self.scan["bo_history"][index]
Expand Down

0 comments on commit c501937

Please sign in to comment.