Skip to content

Commit 2f1ec60

Browse files
committed
Check int axes
1 parent 06f9e83 commit 2f1ec60

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/mslice/scripting/helperfunctions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def add_cut_lines_with_width(errorbars, script_lines, cuts, intensity_correction
221221
integration_start = cut.integration_axis.start
222222
integration_end = cut.integration_axis.end
223223
cut_start = integration_start
224-
print(cut.width)
224+
225225
if cut.width is not None:
226226
cut_end = min(integration_start + cut.width, integration_end)
227227
else:
@@ -231,6 +231,8 @@ def add_cut_lines_with_width(errorbars, script_lines, cuts, intensity_correction
231231
algo_str = "" if "Rebin" in cut.algorithm else f', Algorithm="{cut.algorithm}"'
232232

233233
while cut_start != cut_end and index < len(errorbars):
234+
print(cut_start)
235+
print(cut_end)
234236
cut.integration_axis.start = cut_start
235237
cut.integration_axis.end = cut_end
236238
cut_axis = str(cut.cut_axis)

tests/scripting_helperfunctions_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ def test_that_add_cut_lines_with_width_works_as_expected_with_multiple_cuts(self
544544
"1",
545545
)
546546
cut_0.parent_ws_name = "ws_0"
547-
#cut_0.width = "0.5"
548547

549548
cut_2 = Cut(
550549
Axis("|Q|", "1", "3", "1"),
@@ -569,7 +568,7 @@ def test_that_add_cut_lines_with_width_works_as_expected_with_multiple_cuts(self
569568
0,
570569
"ws_0",
571570
cuts[0].cut_axis,
572-
"DeltaE,-1.0,-0.5,0.0",
571+
"DeltaE,-1.0,0.0,0.0",
573572
cuts[0].norm_to_one,
574573
False,
575574
None,
@@ -583,7 +582,7 @@ def test_that_add_cut_lines_with_width_works_as_expected_with_multiple_cuts(self
583582
1,
584583
"ws_0",
585584
cuts[0].cut_axis,
586-
"DeltaE,-0.5,0.0,0.0",
585+
"DeltaE,0.0,1.0,0.0",
587586
cuts[0].norm_to_one,
588587
False,
589588
None,

0 commit comments

Comments
 (0)