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
a0d545d9
Commit
a0d545d9
authored
8 years ago
by
David Fairbrother
Browse files
Options
Downloads
Patches
Plain Diff
Re #18666 Include offset filename in SplinedVanadium File
parent
b80b62ec
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_routines/polaris_algs.py
+11
-11
11 additions, 11 deletions
.../Diffraction/isis_powder/polaris_routines/polaris_algs.py
with
11 additions
and
11 deletions
scripts/Diffraction/isis_powder/polaris_routines/polaris_algs.py
+
11
−
11
View file @
a0d545d9
...
...
@@ -38,17 +38,19 @@ def get_run_details(run_number_string, inst_settings):
chopper_config
=
yaml_dict
[
"
chopper_off
"
]
label
=
yaml_dict
[
"
label
"
]
offset_file_name
=
yaml_dict
[
"
offset_file_name
"
]
empty_runs
=
chopper_config
[
"
empty_run_numbers
"
]
vanadium_runs
=
chopper_config
[
"
vanadium_run_numbers
"
]
splined_vanadium_name
=
_generate_splined_van_name
(
chopper_on
=
inst_settings
.
chopper_on
,
vanadium_run_string
=
vanadium_runs
)
grouping_full_path
=
os
.
path
.
normpath
(
os
.
path
.
expanduser
(
inst_settings
.
calibration_dir
))
grouping_full_path
=
os
.
path
.
join
(
grouping_full_path
,
inst_settings
.
grouping_file_name
)
in_calib_dir
=
os
.
path
.
join
(
inst_settings
.
calibration_dir
,
label
)
calibration_full_path
=
os
.
path
.
join
(
in_calib_dir
,
yaml_dict
[
"
offset_file_name
"
])
calibration_full_path
=
os
.
path
.
join
(
in_calib_dir
,
offset_file_name
)
# Generate the name of the splined file we will either be loading or saving
splined_vanadium_name
=
_generate_splined_van_filename
(
chopper_on
=
inst_settings
.
chopper_on
,
vanadium_run_string
=
vanadium_runs
,
offset_file_name
=
offset_file_name
)
splined_vanadium
=
os
.
path
.
join
(
in_calib_dir
,
splined_vanadium_name
)
run_details
=
RunDetails
(
run_number
=
run_number
)
...
...
@@ -106,13 +108,11 @@ def _apply_bragg_peaks_masking(workspaces_to_mask, mask_list):
return
output_workspaces
def
_generate_splined_van_name
(
chopper_on
,
vanadium_run_string
):
output_string
=
"
SVan_
"
+
str
(
vanadium_run_string
)
+
"
_chopper
"
if
chopper_on
:
output_string
+=
"
On
"
else
:
output_string
+=
"
Off
"
def
_generate_splined_van_filename
(
chopper_on
,
vanadium_run_string
,
offset_file_name
):
output_string
=
"
SplinedVan_
"
+
str
(
vanadium_run_string
)
+
"
_chopper
"
output_string
+=
"
On
"
if
chopper_on
else
"
Off
"
output_string
+=
'
_
'
+
offset_file_name
output_string
+=
"
.nxs
"
return
output_string
...
...
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