Robin Schmidt
Robin Schmidt
x: original/target x2: simple solver result (gbsv) x4: sophisticated solver result (gbsvxx)  there's also a gbsvx with an intermediate level of sophistication - in case you wonder, why there's...
i have set up an example system of equations A*x = b with known matrix A and vector x and computed the right-hand side b via a matrix-vector multiply, like...
so, in your second pic, you have shifted the green signal such that its decay section of the envelope best matches the decay of the other signal?
can i assume both signals to have the same overall amplitude and decay rate, like in your pic?
hmm...ok - i have an idea: use the log of the envelope (should be roughly linear, assuming exponential decay) -> fit a line to both log-envelopes by linear regression ->...
hmm - ok - this is what my algo does to two exponential decays with different initial amplitudes and matching decay times:  blue: reference signal, green: to-be-shifted signal, red:...
this is what happens when the green decays twice as fast as the blue - it gets right-shifted more::  dunno what would be the most reasonable behavior in cases...
when green decays half as fast as blue, it even gets left-shifted: 
.....but i guess, if it's the same instrument hit at different strengths, the decay time actually *will* match because its a property of the instrument and not of the way...
but - by the way - what is actually the purpose of such a match? it doesn't really strike me as useful to shift the quiet hit forward in time...