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
4c32e0c2
Commit
4c32e0c2
authored
5 years ago
by
Sam Jenkins
Browse files
Options
Downloads
Patches
Plain Diff
Re #25502 acted on review comments
parent
987be46a
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/Engineering/EnginX.py
+9
-8
9 additions, 8 deletions
scripts/Engineering/EnginX.py
with
9 additions
and
8 deletions
scripts/Engineering/EnginX.py
+
9
−
8
View file @
4c32e0c2
...
...
@@ -14,7 +14,7 @@ from platform import system
from
shutil
import
copy2
from
six
import
u
import
mantid.plots
# noqa
import
mantid.plots
# noqa
import
Engineering.EnggUtils
as
Utils
import
mantid.simpleapi
as
simple
...
...
@@ -380,7 +380,7 @@ def create_difc_zero_workspace(difc, tzero, crop_on, name):
# loop through used banks
for
i
in
banks
:
actual_i
=
correction
+
i
actual_i
=
correction
+
i
# retrieve required workspace
if
not
plot_spec_num
:
bank_ws
=
simple
.
AnalysisDataService
.
retrieve
(
"
engg_calibration_bank_{}
"
.
format
(
actual_i
))
...
...
@@ -609,7 +609,7 @@ def _prepare_focus(run_number, van_curves, van_int, do_pre_process, params, time
return
van_curves_ws
,
van_integrated_ws
,
ws_to_focus
def
_save_out
(
run_number
,
focus_directory
,
focus_general
,
output
,
join_string
,
bank_id
):
def
_save_out
(
run_number
,
focus_directory
,
focus_general
,
output
,
enginx_file_name_format
,
bank_id
):
"""
save out the files required for the focus
...
...
@@ -617,13 +617,14 @@ def _save_out(run_number, focus_directory, focus_general, output, join_string, b
@param focus_directory :: the user directory to save to
@param focus_general :: the general folder to copy the saved out files to
@param output :: the workspace to save
@param
join_string
:: the nameing scheme of the files
@param
enginx_file_name_format
:: the nameing scheme of the files
@param bank_id :: the bank being saved
"""
# work out where to save the files
dat_name
,
genie_filename
,
gss_name
,
hdf5_name
,
nxs_name
=
_find_focus_file_location
(
bank_id
,
focus_directory
,
join_string
,
run_number
)
enginx_file_name_format
,
run_number
)
if
not
u
(
bank_id
).
isnumeric
():
bank_id
=
0
# save the files out to the user directory
...
...
@@ -644,9 +645,9 @@ def _save_out(run_number, focus_directory, focus_general, output, join_string, b
copy2
(
hdf5_name
,
focus_general
)
def
_find_focus_file_location
(
bank_id
,
focus_directory
,
join_string
,
run_number
):
run_and_bank
=
join_string
.
format
(
run_number
,
bank_id
,
"
{}
"
)
def
_find_focus_file_location
(
bank_id
,
focus_directory
,
enginx_file_name_format
,
run_number
):
# Leave final {} in string so that file extension can be set.
run_and_bank
=
enginx_file_name_format
.
format
(
run_number
,
bank_id
,
"
{}
"
)
filename
=
os
.
path
.
join
(
focus_directory
,
run_and_bank
)
genie_filename
=
os
.
path
.
join
(
focus_directory
,
run_and_bank
.
replace
(
"
_
"
,
""
,
1
).
format
(
"
.his
"
))
...
...
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