Moment calculation

Refer to irfpy.util.energyspectrum.