Finally fixed bug w/ weird data dropping. Fixed it by replacing data_unsigned with data in the R_peak finding