add Stream.stack method #2440
What does this PR do?
I added a stack method to the Stream object. Any discussion about the implementation is welcome before adding some tests.
Why was it initiated? Any relevant Issues?
d-chambers left a comment
This looks great, I have done stacking "by hand" before and this will make it much easier.
One major question I have is how this handles temporal alignment. It seems the
Also, as @QuLogic mentioned, a few more validations on inputs/helpful error messages would be useful.
This is done by these lines
This means the starttime is preserved if it is the same for all traces in one group. In all other cases the user has to take care of it. I think I will add a test for this and maybe make it more clear in the doc.
* use stats.stack as AttribDict instead of adding fields individually * change names of arguments * document type on exta line * operates in-place now * add time_tol parameter * raise on different sampling_rate