How do I clean time series? (accelerometer data)

I have data from an accelerometer placed on a person’s head, with the intention of measuring the small movements of the head with every heartbeat. Theoretically, the cleaned data should be periodic.

Because I’m interested in only small movements, I need to clean the data by removing large movements.

I’m not sure how to do this, because:

  • There’s no established maximum threshold before a movement becomes “large”.
  • I also can’t do a sliding window average to locate large movements because sometimes the large movement is 1 second and sometimes it’s 1 minute in duration.
  • I also can’t use a method like IsolationForest because I don’t have a “contamination” parameter: some recordings may be over 50% large movements while others are 0% large movements. This also makes it hard to use a z-score method.

How can I clean my data?