Skip to content
Snippets Groups Projects
Commit 647434a2 authored by Joseph Ramsay's avatar Joseph Ramsay
Browse files

Re #20603 Tidied up a little

parent 6c47401d
No related branches found
No related tags found
No related merge requests found
...@@ -31,8 +31,10 @@ class Polaris(AbstractInst): ...@@ -31,8 +31,10 @@ class Polaris(AbstractInst):
def create_vanadium(self, **kwargs): def create_vanadium(self, **kwargs):
self._inst_settings.update_attributes(kwargs=kwargs) self._inst_settings.update_attributes(kwargs=kwargs)
return self._create_vanadium(run_number_string=self._inst_settings.run_in_range, vanadium_d = self._create_vanadium(run_number_string=self._inst_settings.run_in_range,
do_absorb_corrections=self._inst_settings.do_absorb_corrections) do_absorb_corrections=self._inst_settings.do_absorb_corrections)
# TODO: save vanadium_d
return vanadium_d
def set_sample_details(self, **kwargs): def set_sample_details(self, **kwargs):
kwarg_name = "sample" kwarg_name = "sample"
...@@ -83,9 +85,9 @@ class Polaris(AbstractInst): ...@@ -83,9 +85,9 @@ class Polaris(AbstractInst):
# Test if it can be converted to an int or if we need to ask Mantid to do it for us # Test if it can be converted to an int or if we need to ask Mantid to do it for us
if isinstance(run_number, str) and not run_number.isdigit(): if isinstance(run_number, str) and not run_number.isdigit():
# Convert using Mantid and take the first element which is most likely to be the lowest digit # Convert using Mantid and take the first element which is most likely to be the lowest digit
use_new_name = True if int(common.generate_run_numbers(run_number)[0]) >= first_run_new_name else False use_new_name = int(common.generate_run_numbers(run_number)[0]) >= first_run_new_name
else: else:
use_new_name = True if int(run_number) >= first_run_new_name else False use_new_name = int(run_number) >= first_run_new_name
prefix = polaris_new_name if use_new_name else polaris_old_name prefix = polaris_new_name if use_new_name else polaris_old_name
...@@ -93,7 +95,8 @@ class Polaris(AbstractInst): ...@@ -93,7 +95,8 @@ class Polaris(AbstractInst):
def _generate_output_file_name(self, run_number_string): def _generate_output_file_name(self, run_number_string):
suffix = self._inst_settings.suffix suffix = self._inst_settings.suffix
suffix = "" if suffix is None else suffix if suffix is None:
suffix = ""
return Polaris._generate_input_file_name(run_number_string) + suffix return Polaris._generate_input_file_name(run_number_string) + suffix
def _get_input_batching_mode(self): def _get_input_batching_mode(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment