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
2d4ad519
Commit
2d4ad519
authored
9 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Implemented optioanl scale algorithm call before subtraction
Refs #13993
parent
059855c3
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
MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
+12
-0
12 additions, 0 deletions
...Qt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
with
12 additions
and
0 deletions
MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
+
12
−
0
View file @
2d4ad519
...
@@ -36,6 +36,8 @@ void ContainerSubtraction::run() {
...
@@ -36,6 +36,8 @@ void ContainerSubtraction::run() {
sampleWsName
.
toStdString
());
sampleWsName
.
toStdString
());
m_originalSampleUnits
=
sampleWs
->
getAxis
(
0
)
->
unit
()
->
unitID
();
m_originalSampleUnits
=
sampleWs
->
getAxis
(
0
)
->
unit
()
->
unitID
();
// If not in wavelength then do conversion
// If not in wavelength then do conversion
if
(
m_originalSampleUnits
!=
"Wavelength"
)
{
if
(
m_originalSampleUnits
!=
"Wavelength"
)
{
g_log
.
information
(
g_log
.
information
(
...
@@ -51,6 +53,16 @@ void ContainerSubtraction::run() {
...
@@ -51,6 +53,16 @@ void ContainerSubtraction::run() {
AnalysisDataService
::
Instance
().
retrieveWS
<
MatrixWorkspace
>
(
AnalysisDataService
::
Instance
().
retrieveWS
<
MatrixWorkspace
>
(
canWsName
.
toStdString
());
canWsName
.
toStdString
());
if
(
m_uiForm
.
ckShiftCan
->
isChecked
())
{
IAlgorithm_sptr
scaleX
=
AlgorithmManager
::
Instance
().
create
(
"ScaleX"
);
scaleX
->
initialize
();
scaleX
->
setProperty
(
"InputWorkspace"
,
canWs
);
scaleX
->
setProperty
(
"OutputWorkspace"
,
canWs
->
getName
());
scaleX
->
setProperty
(
"Factor"
,
m_uiForm
.
spShift
->
value
());
scaleX
->
setProperty
(
"Operation"
,
"Add"
);
scaleX
->
execute
();
}
// If not in wavelength then do conversion
// If not in wavelength then do conversion
std
::
string
originalCanUnits
=
canWs
->
getAxis
(
0
)
->
unit
()
->
unitID
();
std
::
string
originalCanUnits
=
canWs
->
getAxis
(
0
)
->
unit
()
->
unitID
();
if
(
originalCanUnits
!=
"Wavelength"
)
{
if
(
originalCanUnits
!=
"Wavelength"
)
{
...
...
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