reduce outlier margin from 5 sigma to 4 sigma
This commit is contained in:
@ -424,7 +424,7 @@ void ChartViewer::add_data(int step, double data)
|
|||||||
if (last_step < step) {
|
if (last_step < step) {
|
||||||
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
|
// over the last 5 to 20 data items. this is a hack to work around
|
||||||
// getting corrupted data from lammps_get_last_thermo()
|
// getting corrupted data from lammps_get_last_thermo()
|
||||||
const auto &points = series->points();
|
const auto &points = series->points();
|
||||||
@ -442,7 +442,7 @@ void ChartViewer::add_data(int step, double data)
|
|||||||
const double num = count - first;
|
const double num = count - first;
|
||||||
const double avg = ysum / num;
|
const double avg = ysum / num;
|
||||||
const double avgsq = ysumsq / 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);
|
series->append(step, data);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user