Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
43118844
Commit
43118844
authored
May 03, 2016
by
Alex Buts
Browse files
Re #16049 This should fix it
parent
3a2d7743
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/Algorithms/src/GetEi.cpp
View file @
43118844
...
...
@@ -180,7 +180,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specnum_t mon0Spec,
// repeat for the second detector
try
{
monWI
=
WS
->
getIndexFromSpectrumNumber
(
mon
0
Spec
);
monWI
=
WS
->
getIndexFromSpectrumNumber
(
mon
1
Spec
);
}
catch
(
std
::
runtime_error
&
)
{
g_log
.
error
()
<<
"Could not find the workspace index for the monitor at spectrum "
...
...
@@ -237,7 +237,7 @@ std::vector<size_t> GetEi::getMonitorWsIndexs(
throw
Exception
::
NotFoundError
(
"GetEi::getMonitorWsIndexs()"
,
specNum2
);
}
wsInds
.
push_back
(
specNum
Temp
[
0
]);
wsInds
.
push_back
(
wsIndex
Temp
[
0
]);
return
wsInds
;
}
/** Uses E_KE = mv^2/2 and s = vt to calculate the time required for a neutron
...
...
@@ -325,10 +325,18 @@ void GetEi::extractSpec(int64_t wsInd, double start, double end) {
childAlg
->
setProperty
<
MatrixWorkspace_sptr
>
(
"InputWorkspace"
,
getProperty
(
"InputWorkspace"
));
childAlg
->
setProperty
(
"XMin"
,
start
);
childAlg
->
setProperty
(
"XMax"
,
end
);
childAlg
->
setProperty
(
"StartWorkspaceIndex"
,
wsInd
);
childAlg
->
setProperty
(
"EndWorkspaceIndex"
,
wsInd
);
if
(
wsInd
<
std
::
numeric_limits
<
int
>::
max
())
{
auto
ivsInd
=
static_cast
<
int
>
(
wsInd
);
childAlg
->
setProperty
(
"StartWorkspaceIndex"
,
ivsInd
);
childAlg
->
setProperty
(
"EndWorkspaceIndex"
,
ivsInd
);
}
else
{
childAlg
->
setProperty
(
"StartWorkspaceIndex"
,
wsInd
);
childAlg
->
setProperty
(
"EndWorkspaceIndex"
,
wsInd
);
}
childAlg
->
executeAsChildAlg
();
m_tempWS
=
childAlg
->
getProperty
(
"OutputWorkspace"
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment