Probabilistic Power Spectral Densities Questions

Dear Obspy forum.

I am glad to learn Obspy, sorry for the following questions and thank you for your time.

I am trying to get the PPSD following the web page example but doing some modification, let me show you:

st=read(‘F:\+0n1n0\JICA\strong motion\Acel02_Umsa\AC02.HHZ.12-0000.mseed’)

parser=Parser(‘F:\+0n1n0\JICA\strong motion\Acel02_Umsa\AC02_z_ok_dataless.seed’)


Then I got the following error:

SEEDParserException: No channel found with the given SEED id: 1 Trace(s) in Stream:
12.AC02.04.HHZ | 2013-08-24T00:00:03.300000Z - 2013-08-24T01:00:02.025000Z | 40.0 Hz, 143950 samples

my dataless file has the same informmation that the waveform, let me show you the waveform stats

Stats({'network': '12', '_format': 'MSEED', 'mseed': AttribDict({'record_length': 512, 'encoding': 'STEIM1', 'filesize': 303616L, 'dataquality': 'D', 'number_of_records': 593L, 'byteorder': '>'}), 'sampling_rate': 40.0, 'station': 'AC02', 'location': '04', 'starttime': UTCDateTime(2013, 8, 24, 0, 0, 3, 300000), 'delta': 0.025, 'calib': 1.0, 'npts': 143950, 'endtime': UTCDateTime(2013, 8, 24, 1, 0, 2, 25000), 'channel': 'HHZ'})

Can you help me or give me some tips to keep going ahead with obspy.

Thank you for your time, best regards.


Hi Gonzalo,

the parser.getPAZ() method takes a string denoting the SEED id, not a stream object.

if you do

paz = parser.getPAZ(st[0].id, st[0].stats.starttime)

it should work. This will extract the poles and zeros for the first trace in your stream objects. You should always also specify the time as instrument responses might change with time.



Hi Gonzalo!

You can simply provide the parser object to the PPSD at instantiation:

ppsd = PPSD(st[0].stats, parser=parser)

You can then add() new data to the PPSD and the correct response information will be selected from the parser automatically.

Hope that helps,

On 15/05/14 04:49, gonzalo antonio fernandez mara�on wrote:

To follow up on this, as the PPSD's docs page states, it is much safer to use a Parser object instead of static PAZ dictionary. I would strongly advise you go that way.