# obspy.signal.invsim.evalresp with client.resp

**URL:** https://discourse.obspy.org/t/obspy-signal-invsim-evalresp-with-client-resp/663
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [May 10, 2017, 2:06pm UTC](https://discourse.obspy.org/t/obspy-signal-invsim-evalresp-with-client-resp/663 "2017-05-10T14:06:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mth](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/m/dc4da7/32.png) [@mth](https://discourse.obspy.org/u/mth)
#### Post date: [May 10, 2017, 2:06pm UTC](https://discourse.obspy.org/t/obspy-signal-invsim-evalresp-with-client-resp/663/1 "2017-05-10T14:06:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [May 11, 2017, 8:41am UTC](https://discourse.obspy.org/t/obspy-signal-invsim-evalresp-with-client-resp/663/2 "2017-05-11T08:41:03Z")

</div>

Hi Mike,

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

> **[obspy.clients.fdsn.client.Client.get\_stations — ObsPy 1.4.2 documentation](https://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

> **[obspy.core.stream.Stream.remove\_response — ObsPy 1.4.2 documentation](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:

> **[Seismometer Correction/Simulation — ObsPy 1.4.2 documentation](https://docs.obspy.org/tutorial/code_snippets/seismometer_correction_simulation.html?highlight=correction)**

T
