Change plots to use PyQtplot. Add energy in pulse calculation