Fixed iteration issue. Working version
Some minor edits
Plots energy deposit vs peak-pedestal locations from MIDAS