Dear all,
I am struggling with the rotate function of ObsPy.
I have a Stream with 3 Traces - one for each channel. The channels are labeleld HHZ, HH2 and HH3:
3 Trace(s) in Stream:
Z3.A333A.00.HH2 | 2017-12-12T07:46:39.165000Z - 2017-12-12T07:46:41.155000Z | 100.0 Hz, 200 samples
Z3.A333A.00.HH3 | 2017-12-12T07:46:39.165000Z - 2017-12-12T07:46:41.155000Z | 100.0 Hz, 200 samples
Z3.A333A.00.HHZ | 2017-12-12T07:46:39.165000Z - 2017-12-12T07:46:41.155000Z | 100.0 Hz, 200 samples
Channels are 2+3 instead of N+E because the sensor is not pointing to the North. Now I want to rotate this Stream such that I actually do get ZNE data. I have the inventory file with the correct orientation specified. Still, I cannot get my data rotated.
If I use only
stream.rotate(method=’->ZNE’, inventory=inv)
or
stream._rotate_to_zne(inv)
it doesn’t do anything. No error message either. Certainly the data is not rotated. I figured I should indicate the components, since my channels are not Z12 or 123. So I tried specifying the components:
First of all I now wonder if the order of the channels matter and if they relate to the order of Traces in the Stream? Anyways, whatever order I chose, I end up with an error message:
stream.rotate(method=’->ZNE’, inventory=inv, components=‘Z23’)
or
stream._rotate_to_zne(inv, components=‘23Z’)
-> IndexError: list index out of range
The error occurs in this part of the function code:
to be used in rotation
3294 st = self.select(network=network, station=station, location=location)
-> 3295 st = (st.select(channel=channels[0]) + st.select(channel=channels[1]) +
3296 st.select(channel=channels[2]))
3297 # remove the original unrotated traces from the stream
This makes me wonder if there is maybe a bug in the function and that rearranging the Traces doesn’t work correctly? Or do I mess it up by not setting the right channel order?
Any help is much appreciated.
Thank you very much,
Florian