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

http://docs.obspy.org/packages/autogen/obspy.clients.fdsn.client.Client.get_stations.html#obspy.clients.fdsn.client.Client.get_stations

and use methods attached to stream for instrument correction

https://docs.obspy.org/packages/autogen/obspy.core.stream.Stream.remove_response.html?highlight=remove%20response#obspy.core.stream.Stream.remove_response

Also see corresponding Tutorial entry:

https://docs.obspy.org/tutorial/code_snippets/seismometer_correction_simulation.html?highlight=correction

T