Add detect, consecutive, and min_duration parameters to find_events()