Skip to content

Commit d960038

Browse files
committed
improved run_focus_absorption readability
1 parent ed9ce53 commit d960038

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

Testing/SystemTests/tests/framework/ISIS_PowderPolarisTest.py

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -634,28 +634,22 @@ def run_focus_absorption(run_number, paalman_pings=False):
634634
shutil.copy(original_splined_path, spline_path)
635635

636636
inst_object = setup_inst_object("PDF", with_container=True)
637+
focus_kwargs = {}
637638
if paalman_pings:
638639
inst_object._inst_settings.empty_can_subtraction_method = "PaalmanPings" # the default is Simple
639640
inst_object._inst_settings.paalman_pings_events_per_point = 1
640-
641-
return inst_object.focus(
642-
run_number=run_number,
643-
input_mode="Summed",
644-
do_van_normalisation=True,
645-
do_absorb_corrections=True,
646-
sample_empty=sample_empty,
647-
multiple_scattering=False,
648-
)
649641
else:
650-
return inst_object.focus(
651-
run_number=run_number,
652-
input_mode="Summed",
653-
do_van_normalisation=True,
654-
do_absorb_corrections=True,
655-
sample_empty=sample_empty,
656-
sample_empty_scale=sample_empty_scale,
657-
multiple_scattering=False,
658-
)
642+
focus_kwargs["sample_empty_scale"] = sample_empty_scale
643+
644+
return inst_object.focus(
645+
run_number=run_number,
646+
input_mode="Summed",
647+
do_van_normalisation=True,
648+
do_absorb_corrections=True,
649+
sample_empty=sample_empty,
650+
multiple_scattering=False,
651+
**focus_kwargs,
652+
)
659653

660654

661655
def setup_mantid_paths():

0 commit comments

Comments
 (0)