Problem with

It seems to be working properly for the first station in the stream; but, not for the rest. This applies to those rotations that need back-azimuth. The reason is in the following block of “”:

 if back_azimuth is None:
                back_azimuth = self[0].stats.back_azimuth

It sets the back-azimuth for all channels in the stream to that of the first channel.



I would recommend to just do rotations with Stream objects that only
hold three components for one single instrument.. and it's better to
explicitly provide back_azimuth etc to the rotate method instead of
relying on the "self" lookup magic (we're not really happy about some
magic lookups we put into the code at some point and try to discourage
their use).

st_rotated = Stream()
nsl = set((, tr.stats.station, tr.stats.location)
          for tr in st)
for net, sta, loc in nsl:
    st_tmp =, station=sta, location=loc)
    st_rotated += st_tmp.rotate(...)