I have recordings of stroke pressure traces. One stroke consists of one or more timestamps and associated pressure values. Some strokes also only contain a single pressure value. An example of 3 strokes could be the following:
stroke_id timestamp pressure 1 5001 143 1 5230 170 1 5360 500 1 5600 420 2 10223 1052 3 942 6523 3 1532 6000 3 1700 5500
I'm only interested in the shape of the pressure curve and not the absolute values. What I would like to compute is the average curve (the shape). For this purpose I thought about the following steps:
- Move every stroke to the origin
- Interpolate (or extrapolate) each stroke because the timestamps are not evenly spaced. Perhaps not linear but cubic interpolation.
- Compute the average over the strokes
- Plot the average stroke
I don't know if this is the correct procedure and I'm also not sure how to tackle the individual steps. Moreover, I'm unsure how to handle strokes with only one pressure value.
I would be happy if somebody could bring light into the dark.