obspy.signal.invsim.evalresp with client.resp

Hi.
I’m trying obspy.signal.invsim.evalresp for the first time.

I understand that it needs to be passed a RESP filename (or readable object) to scan.

I get the RESP from the obspy.clients.iris.Client:
client = Client()
dt = UTCDateTime(“2005-01-01”)
resp = client.resp(“IU”, “ANMO”, “00”, “BHZ”, starttime=dt, endtime=None)

resp returns an object of type:
future.types.newbytes.newbytes

Is there a way to use this resp as an input to the invsim.evalresp call ?
ie, is there some method on newbytes that can be used ?
I tried resp.encode() but that just raises a message saying that method has been disabled.

Or do I have to write resp out to a file first ?

Thanks!
-Mike

Hi Mike,

if you don't need any low level functionality, it's easiest to download
station inventory using FDSN

and use methods attached to stream for instrument correction

Also see corresponding Tutorial entry:

T