diff --git a/tools/lammps-gui/chartviewer.cpp b/tools/lammps-gui/chartviewer.cpp index 71ba07de4c..4ea5449f3f 100644 --- a/tools/lammps-gui/chartviewer.cpp +++ b/tools/lammps-gui/chartviewer.cpp @@ -424,7 +424,7 @@ void ChartViewer::add_data(int step, double data) if (last_step < step) { last_step = step; - // do not add data that deviates by more than 5 sigma from the average + // do not add data that deviates by more than 4 sigma from the average // over the last 5 to 20 data items. this is a hack to work around // getting corrupted data from lammps_get_last_thermo() const auto &points = series->points(); @@ -442,7 +442,7 @@ void ChartViewer::add_data(int step, double data) const double num = count - first; const double avg = ysum / num; const double avgsq = ysumsq / num; - if (fabs(data - avg) > (5.0 * sqrt(avgsq - (avg * avg)))) return; + if (fabs(data - avg) > (4.0 * sqrt(avgsq - (avg * avg)))) return; } series->append(step, data);