Commit 19ac35e4 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

ClusteringSpatial: corrected summing of columns/rows for arithmetic mean

parent 3af35c36
......@@ -198,8 +198,8 @@ void ClusteringSpatial::calculateClusterCentre(Cluster* cluster) {
// We need both column_sum and column_sum_chargeweighted
// as we don't know a priori if there will be a pixel with
// charge==0 such that we have to fall back to the arithmetic mean.
column_sum += (pixel->column() * pixel->charge());
row_sum += (pixel->row() * pixel->charge());
column_sum += pixel->column();
row_sum += pixel->row();
column_sum_chargeweighted += (pixel->column() * pixel->charge());
row_sum_chargeweighted += (pixel->row() * pixel->charge());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment