Hey Stack Overflow community,
I've been given a series of datasets that resembles a square pulse, and ideally looks like the following:
This particular plot is composed of many sets of data.
I'm wondering if there is a way to reduce the noise found in the data, and retrieve just the area under the square pulse with the assumption that "spikes" may appear before or on the actual pulse itself.
The method I've tried is to cut everything before and after the pulse, and look for spikes that may occur on the actual pulse by looking at how much each value deviates from the mode peak found. However, this seems less than adequate as my implementation requires going through each point multiple times generating quite a large time complexity, and the file sizes are pretty huge.
Thanks for helping out!