Resyncing the traces

I gathered 10k traces at 1GS/s and 200ksamples (zoomed in for first two rounds) using asynchronous sampling. I decimated them to shorten the sample amount. I see that the traces are out of sync, yet they give some result. I was thinking, maybe the result could be better when I resync the traces?

The first trace looks like this

Five different traces look like this

The result of the attack is following:

What setup would be the best to make the traces even for the analysis? I tried resyncing using SAD, but it almostly deletes every other trace than the reference trace…

import chipwhisperer.analyzer as cwa
resync_traces = cwa.preprocessing.ResyncSAD(project)
resync_traces.ref_trace = 0
resync_traces.target_window = (3000, 15000)
resync_traces.max_shift = 1500
resync_analyzer = resync_traces.preprocess()

The time warp gives me an error:

IndexError: list index out of range

Is there any help for such jittery traces?

With resynchronization, providing proper parameters (i.e. target_window, max_shift) is crucial. If ResyncSAD is deleting all your traces, that means it’s not able to synchronize with the parameters you gave it.
I would advise that you try to manually synchronize a few traces. Once you’ve done that, then you’ll know what are good values for target_window and max_shift.

How do I know which window is good for it? I thought the traces have to be in an even line, so creating a window over that even line would force others to adjust?

The window identifies the samples over which the SAD is computed. Determining a good window is a manual exercise: you need to look at your traces and take an educated guess. If your traces have distinctive features (i.e. peaks, patterns, big changes in activity), those are good to include in the window.