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
6c26b3a1
Commit
6c26b3a1
authored
9 years ago
by
Raquel Alvarez Banos
Browse files
Options
Downloads
Patches
Plain Diff
Re #13952 Fit requested spectra only
parent
7a0b6f7d
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
Framework/WorkflowAlgorithms/src/MuonCalculateAsymmetry.cpp
+11
-0
11 additions, 0 deletions
Framework/WorkflowAlgorithms/src/MuonCalculateAsymmetry.cpp
with
11 additions
and
0 deletions
Framework/WorkflowAlgorithms/src/MuonCalculateAsymmetry.cpp
+
11
−
0
View file @
6c26b3a1
...
...
@@ -235,18 +235,28 @@ MatrixWorkspace_sptr MuonCalculateAsymmetry::calculateGroupAsymmetry(
alg
->
execute
();
MatrixWorkspace_sptr
sumWS
=
alg
->
getProperty
(
"OutputWorkspace"
);
// GroupIndex as vector
// Necessary if we want RemoveExpDecay to fit only the requested
// spectrum
std
::
vector
<
int
>
spec
(
1
,
groupIndex
);
// Remove decay
IAlgorithm_sptr
asym
=
createChildAlgorithm
(
"RemoveExpDecay"
);
asym
->
setProperty
(
"InputWorkspace"
,
sumWS
);
asym
->
setProperty
(
"Spectra"
,
spec
);
asym
->
execute
();
tempWS
=
asym
->
getProperty
(
"OutputWorkspace"
);
}
else
if
(
op
==
"-"
)
{
// GroupIndex as vector
std
::
vector
<
int
>
spec
(
1
,
groupIndex
);
// Remove decay (first period ws)
IAlgorithm_sptr
asym
=
createChildAlgorithm
(
"RemoveExpDecay"
);
asym
->
initialize
();
asym
->
setProperty
(
"InputWorkspace"
,
firstPeriodWS
);
asym
->
setProperty
(
"Spectra"
,
spec
);
asym
->
execute
();
MatrixWorkspace_sptr
asymFirstPeriod
=
asym
->
getProperty
(
"OutputWorkspace"
);
...
...
@@ -254,6 +264,7 @@ MatrixWorkspace_sptr MuonCalculateAsymmetry::calculateGroupAsymmetry(
asym
=
createChildAlgorithm
(
"RemoveExpDecay"
);
asym
->
initialize
();
asym
->
setProperty
(
"InputWorkspace"
,
secondPeriodWS
);
asym
->
setProperty
(
"Spectra"
,
spec
);
asym
->
execute
();
MatrixWorkspace_sptr
asymSecondPeriod
=
asym
->
getProperty
(
"OutputWorkspace"
);
...
...
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