Make it possible to aggregate images as weighted mean per sample_id given the number of points in the individual image.