ppsd problem

I’m having trouble using ppsd, I think it might be something to do with the poles and zeros information which I enter manually. Is it possible to use a RESP file to enter this information? or am I doing something else wrong, my code is below.

from obspy.core import read
from obspy.signal import cosTaper, PPSD
import numpy as np
import matplotlib.pyplot as plt

Load data

stream = read(’…/data/UEASK_Z_252.mseed’)
time = np.arange(0,
stream[0].stats.npts / stream[0].stats.sampling_rate,
raw = stream[0]

Basic processing

##stream[0].data = stream[0].data - stream[0].data.mean()
##stream[0].data = stream[0].data * cosTaper(len(stream[0].data), 0.05)
proc = stream[0]

response = {‘gain’: 5912.0,
‘poles’: [(1005.31+0j),
‘sensitivity’: 2916630000.0,
‘zeros’: [0j, 0j]}

ppsd = PPSD(proc.stats, response)
print ppsd.id
print ppsd.times[:2]

Hi David,

as stated in the documentation
it is not only possible but even safer to provide an obspy.xseed Parser
object (with information from preferably a dataless SEED or a RESP file).

furthermore, you do not need to manually taper/demean as this is done
during the instrument response correction (on the 1 hour pieces) inside
the PPSD calculations.
Without the original data I cannot make any guess what your problem
might be. If the problem remains, I suggest you open a ticket on the
webpage and attach the file there.