Rewrite get_energy_bin