Adding to a trace randomly

If I add three traces that fit perfectly and add the one in the middle last I do not get what I expected. I am using method=1 and interpolation_samples=0.

Here is the test case

Wow, nice bug report there, �lafur. Coming with a unit test even..
Bug reports you can also directly open at
https://github.com/obspy/obspy/issues.

With that code piece below, you could even start it right away as a pull
request if you're familiar with git (fork obspy and push to a new
branch, inserting your test function in core/tests/test_trace.py).

Of course, just posting it here is totally fine, too though. :slight_smile:

As to the test you sent, I see two problems already that need to be
addressed. I'll open an issue for it if you don't want to bother making
a github account..

Thanks for reporting!
Tobias