Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
647434a2
Commit
647434a2
authored
7 years ago
by
Joseph Ramsay
Browse files
Options
Downloads
Patches
Plain Diff
Re #20603 Tidied up a little
parent
6c47401d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/Diffraction/isis_powder/polaris.py
+8
-5
8 additions, 5 deletions
scripts/Diffraction/isis_powder/polaris.py
with
8 additions
and
5 deletions
scripts/Diffraction/isis_powder/polaris.py
+
8
−
5
View file @
647434a2
...
...
@@ -31,8 +31,10 @@ class Polaris(AbstractInst):
def
create_vanadium
(
self
,
**
kwargs
):
self
.
_inst_settings
.
update_attributes
(
kwargs
=
kwargs
)
return
self
.
_create_vanadium
(
run_number_string
=
self
.
_inst_settings
.
run_in_range
,
do_absorb_corrections
=
self
.
_inst_settings
.
do_absorb_corrections
)
vanadium_d
=
self
.
_create_vanadium
(
run_number_string
=
self
.
_inst_settings
.
run_in_range
,
do_absorb_corrections
=
self
.
_inst_settings
.
do_absorb_corrections
)
# TODO: save vanadium_d
return
vanadium_d
def
set_sample_details
(
self
,
**
kwargs
):
kwarg_name
=
"
sample
"
...
...
@@ -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
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
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
:
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
...
...
@@ -93,7 +95,8 @@ class Polaris(AbstractInst):
def
_generate_output_file_name
(
self
,
run_number_string
):
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
def
_get_input_batching_mode
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment