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
8e684878
Commit
8e684878
authored
6 years ago
by
Ewan Cook
Browse files
Options
Downloads
Patches
Plain Diff
refs #23023 fix _co_add reappending problem
parent
ee72b25f
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/Muon/GUI/ElementalAnalysis/LoadWidget/load_model.py
+7
-5
7 additions, 5 deletions
scripts/Muon/GUI/ElementalAnalysis/LoadWidget/load_model.py
with
7 additions
and
5 deletions
scripts/Muon/GUI/ElementalAnalysis/LoadWidget/load_model.py
+
7
−
5
View file @
8e684878
...
@@ -37,13 +37,15 @@ class CoLoadModel(lutils.LModel):
...
@@ -37,13 +37,15 @@ class CoLoadModel(lutils.LModel):
else
:
else
:
self
.
workspace
=
self
.
loaded_runs
[
self
.
run
]
self
.
workspace
=
self
.
loaded_runs
[
self
.
run
]
def
add_runs
(
self
,
l
,
r
):
def
add_runs
(
self
,
l
,
r
,
suffix
):
out
=
"
{}_co_add
"
.
format
(
l
)
# prevent new suffix being appended to old one
l
=
l
[:
l
.
rfind
(
"
_
"
)]
if
l
.
endswith
(
"
)
"
)
else
l
out
=
"
{}_({})
"
.
format
(
l
,
suffix
)
mantid
.
Plus
(
l
,
r
,
OutputWorkspace
=
out
)
mantid
.
Plus
(
l
,
r
,
OutputWorkspace
=
out
)
return
out
return
out
def
co_load_run
(
self
,
workspace
):
def
co_load_run
(
self
,
workspace
):
to_add
=
[
self
.
add_runs
(
l
,
r
)
for
l
,
r
in
zip
(
*
lutils
.
flatten_run_data
(
run
=
lutils
.
hyphenise
(
self
.
co_runs
)
to_add
=
[
self
.
add_runs
(
l
,
r
,
run
)
for
l
,
r
in
zip
(
*
lutils
.
flatten_run_data
(
self
.
workspace
,
workspace
))]
self
.
workspace
,
workspace
))]
self
.
workspace
=
lutils
.
group_by_detector
(
self
.
workspace
=
lutils
.
group_by_detector
(
run
,
to_add
)
lutils
.
hyphenise
(
self
.
co_runs
),
to_add
)
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