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
ffda6ac4
Commit
ffda6ac4
authored
9 years ago
by
Owen Arnold
Browse files
Options
Downloads
Plain Diff
Merge pull request #722 from mantidproject/11718_slice_viewer_crash_infs
Slice viewer crash.
parents
687747c2
9a5a117b
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/DataObjects/src/MDHistoWorkspace.cpp
+7
-1
7 additions, 1 deletion
Code/Mantid/Framework/DataObjects/src/MDHistoWorkspace.cpp
with
7 additions
and
1 deletion
Code/Mantid/Framework/DataObjects/src/MDHistoWorkspace.cpp
+
7
−
1
View file @
ffda6ac4
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include
"MantidAPI/IMDIterator.h"
#include
"MantidAPI/IMDIterator.h"
#include
<boost/scoped_array.hpp>
#include
<boost/scoped_array.hpp>
#include
<boost/make_shared.hpp>
#include
<boost/make_shared.hpp>
#include
<boost/math/special_functions/fpclassify.hpp>
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
Geometry
;
using
namespace
Mantid
::
Geometry
;
...
@@ -600,7 +601,12 @@ void MDHistoWorkspace::getLinePlot(const Mantid::Kernel::VMD &start,
...
@@ -600,7 +601,12 @@ void MDHistoWorkspace::getLinePlot(const Mantid::Kernel::VMD &start,
break
;
break
;
}
}
// And add the normalized signal/error to the list too
// And add the normalized signal/error to the list too
y
.
push_back
(
this
->
getSignalAt
(
linearIndex
)
*
normalizer
);
auto
signal
=
this
->
getSignalAt
(
linearIndex
)
*
normalizer
;
if
(
boost
::
math
::
isinf
(
signal
)){
// The plotting library (qwt) doesn't like infs.
signal
=
std
::
numeric_limits
<
signal_t
>::
quiet_NaN
();
}
y
.
push_back
(
signal
);
e
.
push_back
(
this
->
getErrorAt
(
linearIndex
)
*
normalizer
);
e
.
push_back
(
this
->
getErrorAt
(
linearIndex
)
*
normalizer
);
// Save the position for next bin
// Save the position for next bin
lastPos
=
pos
;
lastPos
=
pos
;
...
...
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