obspy.signal.rotate.rotate_NE_RT ???


I would like your advise about a problem I have.

I am running IPython version 2.7.3 (default, Aug 1 2012, 05:14:39) \n[GCC 4.6.3] on Ubuntu.
I want to rotate north and east component of a seismogram to radial and transverse components which seems "easy".

I wrote the line
" rotate_NE_RT(north,east, baz) "
  and get Typeerror message :

TypeError: unsupported operand type(s) for +: 'exceptions.TypeError' and

I was wondering if you had any ideas about this error?

Thanks & Regards,

Here is the code I used and the error message:

from obspy.core import read,Trace

from obspy.core import UTCDateTime

from obspy.signal import cornFreq2Paz

from obspy.signal import seisSim

from obspy.sac import SacIO, attach_paz, attach_resp

from obspy.sac.sacio import SacIO

import matplotlib.pyplot as plt

import numpy as np

Hello Ahu,

probably the error arises, because rotate_NE_RT expects data arrays
and not trace objects.
Assuming you have the components ZNE at traces 0, 1, 2 of st, you
could try e.g.:

st[1].data, st[2].data = rotate_NE_RT(st[1].data, st[2].data, baz)
st[1].stats.channel = st[1].stats.channel[:-1] + 'R'
st[2].stats.channel = st[2].stats.channel[:-1] + 'T'

Hope it helps, Tom