Kenzie, you've got a fun situation because in POE2_Data_Discontinuity.xls
, it's not just the signal exceeding the +/- 180 range.
It's a signal exceeding 2x, 3x... the +/-180 range! I wasn't able to fix it completely with the time I currently have, but I think a place to start is breaking the trial into slices based on the "jumps" occurring in the signal. After you break the trial into
slices, you need to shift signals by a certain amount and in a particular direction. That amount will depend on two things:
- the first value in that slice
- the number of times the signal has consecutively exceeded the range in the same direction.
What I thought would work is puting some shifting code into a while loop that keeps checking and shifting the slices until