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
02e3ba5b
Commit
02e3ba5b
authored
7 years ago
by
Anthony Lim
Browse files
Options
Downloads
Patches
Plain Diff
refs #20844 fixed run label
parent
318def55
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp
+4
-12
4 additions, 12 deletions
qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp
qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp
+18
-1
18 additions, 1 deletion
qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp
with
22 additions
and
13 deletions
qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp
+
4
−
12
View file @
02e3ba5b
...
...
@@ -973,19 +973,11 @@ Muon::DatasetParams parseWorkspaceName(const std::string &wsName) {
*/
void
parseRunLabel
(
const
std
::
string
&
label
,
std
::
string
&
instrument
,
std
::
vector
<
int
>
&
runNumbers
)
{
size_t
path
=
label
.
find_last_of
(
"/"
);
if
(
path
==
std
::
string
::
npos
)
{
size_t
path
=
label
.
find_last_of
(
'\\'
);
}
std
::
string
useThisLabel
=
label
;
if
(
path
!=
std
::
string
::
npos
)
{
useThisLabel
=
label
.
substr
(
0
,
path
);
}
const
size_t
instPos
=
useThisLabel
.
find_first_of
(
"0123456789"
);
instrument
=
useThisLabel
.
substr
(
0
,
instPos
);
const
size_t
numPos
=
useThisLabel
.
find_first_not_of
(
'0'
,
instPos
);
const
size_t
instPos
=
label
.
find_first_of
(
"0123456789"
);
instrument
=
label
.
substr
(
0
,
instPos
);
const
size_t
numPos
=
label
.
find_first_not_of
(
'0'
,
instPos
);
if
(
numPos
!=
std
::
string
::
npos
)
{
std
::
string
runString
=
useThisL
abel
.
substr
(
numPos
,
useThisL
abel
.
size
());
std
::
string
runString
=
l
abel
.
substr
(
numPos
,
l
abel
.
size
());
// sets of continuous ranges
Mantid
::
Kernel
::
StringTokenizer
rangeTokenizer
(
runString
,
","
,
Mantid
::
Kernel
::
StringTokenizer
::
TOK_TRIM
);
...
...
This diff is collapsed.
Click to expand it.
qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp
+
18
−
1
View file @
02e3ba5b
...
...
@@ -20,6 +20,23 @@ using MantidQt::MantidWidgets::MuonFitPropertyBrowser;
namespace
{
Logger
g_log
(
"MuonSequentialFitDialog"
);
std
::
string
removePath
(
const
std
::
string
&
labelIn
)
{
size_t
path
=
labelIn
.
find_last_of
(
"/"
);
if
(
path
==
std
::
string
::
npos
)
{
path
=
labelIn
.
find_last_of
(
'\\'
);
}
std
::
string
useThisLabel
=
labelIn
;
if
(
path
!=
std
::
string
::
npos
)
{
path
=
path
+
1
;
size_t
end
=
labelIn
.
find_last_of
(
"."
);
useThisLabel
=
labelIn
.
substr
(
path
);
useThisLabel
=
useThisLabel
.
substr
(
0
,
end
-
path
);
auto
test
=
useThisLabel
;
}
return
useThisLabel
;
}
}
const
std
::
string
MuonSequentialFitDialog
::
SEQUENTIAL_PREFIX
(
"MuonSeqFit_"
);
...
...
@@ -328,7 +345,7 @@ void MuonSequentialFitDialog::continueFit() {
// Get names of workspaces to fit
const
auto
wsNames
=
m_dataPresenter
->
generateWorkspaceNames
(
m_ui
.
runs
->
getInstrumentOverride
().
toStdString
(),
m_ui
.
runs
->
getText
().
toStdString
(),
false
);
removePath
(
m_ui
.
runs
->
getText
().
toStdString
()
)
,
false
);
if
(
wsNames
.
size
()
==
0
)
{
QMessageBox
::
critical
(
this
,
"No data to fit"
,
...
...
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