Skip to content

Commit

Permalink
k Modify the condition that raises the error when bin_size <= step_si…
Browse files Browse the repository at this point in the history
…ze. Change it to bin_size < step_size
  • Loading branch information
ashmeigh committed Jan 15, 2025
1 parent 41617ac commit a671aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2420: corrected RITS export error when bin size equals step size
2 changes: 1 addition & 1 deletion mantidimaging/gui/windows/spectrum_viewer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def validate_bin_and_step_size(self, roi: SensibleROI, bin_size: int, step_size:
"""
if bin_size and step_size < 1:
raise ValueError("Both bin size and step size must be greater than 0")
if bin_size <= step_size:
if bin_size < step_size:
raise ValueError("Bin size must be larger than or equal to step size")
if bin_size and step_size > min(roi.width, roi.height):
raise ValueError("Both bin size and step size must be less than or equal to the ROI size")
Expand Down

0 comments on commit a671aa9

Please sign in to comment.