Dear all,
I'm trying to rotate stream (containing 3 traces -Z,N,E) to the ZNE system.
Code:
from obspy import read_inventory
from obspy import read
from obspy.signal.rotate import rotate2zne
_mseed="NETWORK.STATION.LOCATION*"
_xml="NETWORK.STATION.xml"
st = read(_mseed)
inv = read_inventory(_xml)
st.attach_response(inv)
data=
azm=
dip=
orientations=['Z','N','E']
for orientation in orientations:
data.append(st.select(channel='*'+orientation).traces[0].data)
dip.append(inv.select(channel='*'+orientation)[0][0][0].dip)
azm.append(inv.select(channel='*'+orientation)[0][0][0].azimuth)
_results = rotate2zne(data[0], azm[0], dip[0], data[1], azm[1], dip[1], data[2], azm[2], dip[2])
But I get the following error:
Traceback (most recent call last):
File "new_rotate.py", line 27, in <module>
_results = rotate2zne(data[0], azm[0], dip[0], data[1], azm[1], dip[1], data[2], azm[2], dip[2])
File "/usr/local/lib/python2.7/dist-packages/obspy/signal/rotate.py", line 257, in rotate2zne
x, y, z = np.dot(_t, [data_1, data_2, data_3])
ValueError: setting an array element with a sequence.
Any ideas?
Thank you in advance,
Nikos