Energy tacking is done! After locating an avg peak, we find the peak for all the individual atoms that is closest to this peak and do regression on the intensity values of those peaks.