Refactor peak detection
Currently using scipys signal.argrelmin and signal.argrelmax but these might not behave as expected all the time. Could consider using signal.find_peaks or home equivalent. Also need a better option for removing tiny peaks below numerical precision