Correctly calculate average of spectral descriptors