add a scan tool that calculates also the average energy