-
Notifications
You must be signed in to change notification settings - Fork 128
Description
Describe the bug
If you have already run focus
then subsequent calls to focus
will use the last empty run specified (or if not specified previously then the default in the mapping file), regardless of sample_empty
user supplies.
This is despite polaris._inst_settings.sample_empty
looking like it is set correctly - perhaps it is just retrieving a cached/saved version?
To Reproduce
(1) Ask me for files
(2) Update paths in .yaml files
(3) Run this script
from mantid.simpleapi import *
import numpy as np
from isis_powder import polaris, SampleDetails
config_file_path = r"C:\Users\xhg73778\Documents\POLARIS\PR34144Files\polaris_config_example.yaml"
polaris = polaris.Polaris(config_file=config_file_path, user_name="test")
sample_details = SampleDetails(height=4.0, radius=0.2985, center=[0, 0, 0], shape='cylinder')
sample_details.set_material(chemical_formula='Si', packing_fraction=0.6)
sample_details.set_container(radius=0.3175, chemical_formula='V')
polaris.set_sample_details(sample=sample_details)
# focus
polaris.create_vanadium(first_cycle_run_no="98532", multiple_scattering=True, mayers_mult_scat_events=1)
polaris.focus(run_number="98533", input_mode='Summed', sample_empty="98532",
mode="PDF", do_absorb_corrections=True, do_van_normalisation=True,
van_normalisation_method="Absolute",
empty_can_subtraction_method= "PaalmanPings",
sample_empty_scale=1.0)
(4) Check the workspace history, the last call to the Minus algorithm should use a workspace derived from run 98532
(5) Call focus
again without specifying sample_empty
polaris.focus(run_number="98533", input_mode='Summed',
mode="PDF", do_absorb_corrections=True, do_van_normalisation=True,
van_normalisation_method="Absolute",
empty_can_subtraction_method= "PaalmanPings",
sample_empty_scale=1.0)
(6) Check the workspace history, the last call to the Minus algorithm will use the same workspace derived from run 98532
Expected behavior
It should use the default empty run specified in the cycle map .yaml file, this will appear in the history like summed_emtpy
or similar.
Screenshots
Platform/Version (please complete the following information):
- OS: [e.g. Windows, RHEL 7, Ubuntu, macOS]
- OS Version:
- Mantid Version [e.g. 6.0.0]
Additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status
Status