Wagner Lab helper functions for signal preprocessing