Commit 6ac7cc81 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'follow_up_improve_clustering4d' into 'master'

Follow-up on MR !114: Improve Clustering

See merge request !165
parents 5cedc587 19ac35e4
Pipeline #1087174 passed with stages
in 25 minutes and 20 seconds
......@@ -192,8 +192,8 @@ void Clustering4D::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());
......
......@@ -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());
......
Markdown is supported
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