Skip to content
Snippets Groups Projects
Commit 77f63df6 authored by Zhang, Chen's avatar Zhang, Chen
Browse files

raise the default tolerance to 1e-10 from 0.0 to help float cmp

parent 009ca9c3
Branches 23667_slim_down_MantidQtCommonWidgetsQt5_lib
No related tags found
No related merge requests found
......@@ -137,7 +137,7 @@ void CompareWorkspaces::init() {
"The name of the second input workspace.");
declareProperty(
"Tolerance", 0.0,
"Tolerance", 1e-10,
"The maximum amount by which values may differ between the workspaces.");
declareProperty("CheckType", true,
......@@ -1153,6 +1153,11 @@ void CompareWorkspaces::doPeaksComparison(PeaksWorkspace_sptr tws1,
s2 = peak2.getCol();
}
if (std::fabs(s1 - s2) > tolerance) {
g_log.debug(name);
g_log.debug() << "s1 = " << s1 << "\n"
<< "s2 = " << s2 << "\n"
<< "std::fabs(s1 - s2) = " << std::fabs(s1 - s2) << "\n"
<< "tolerance = " << tolerance << "\n";
g_log.debug() << "Data mismatch at cell (row#,col#): (" << i << "," << j
<< ")\n";
recordMismatch("Data mismatch");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment