how can we align wto signals with a time lag in between?
I thought you might have to smooth, sort or create an envelope of your signal, which might help. But then i found this. This should help you.

Or if you wish to use MATLAB, you can use this command.