Changed resonance finding math from np.argmax(data) to np.argmax(np.abs(data)) to also fit descending peaks.