Skip to content

Commit 2e497da

Browse files
Simon99Chu Julung
andauthored
fix: display actual tolerance in CofR error message (#2296)
Improves error message by showing the tolerance value that was used, making it easier for users to understand what needs adjustment. Fixes #2295 Co-authored-by: Chu Julung <chujulung@ChudeMacBook-Air.local>
1 parent 5ecdd83 commit 2e497da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Wrappers/Python/cil/processors/CofR_image_sharpness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def gss(self, data, ig, search_range, tolerance, binning):
194194
new_point = sample_points[-1]- step_c
195195

196196
else:
197-
raise ValueError("The centre of rotation could not be located to the requested tolerance. Try increasing the search tolerance.")
197+
raise ValueError(f"The centre of rotation could not be located to the requested tolerance ({tolerance:.6f} pixels). Try increasing the search tolerance.")
198198

199199
if interval < tolerance:
200200
break

0 commit comments

Comments
 (0)