Obspy: remove_response() function with stationXML issue?

Created on 28 Jan 2020  Â·  4Comments  Â·  Source: obspy/obspy

Hello,

Since some datacenters do not distribute dataless anymore but only stationXML, it is not possible to use the following function to remove instrument response anymore:
client = obspy.clients.fdsn.Client(datacenter)
st = client.get_waveforms(network",station,locid,channel,starttime,endtime,attach_response=True)
st.remove_response(output="VEL",taper = False ,water_level = 60.0)

Do you know if this problem will be fixed?
Regards,
Coralie

All 4 comments

I think the easiest solution here is to download the inventory separately for all those stations and then based on it remove the response.

client = obspy.clients.fdsn.Client(datacenter)
st = client.get_waveforms(network, station, locid, channel, starttime, endtime)
inventory = client.get_stations(network, station, locid, channel, starttime, endtime, level="response")
st.remove_response(inventory=inventory, output="VEL", taper = False, water_level = 60.0)

https://docs.obspy.org/packages/autogen/obspy.core.stream.Stream.remove_response.html

The same method should work for an StationXML file that you will read by obspy.read_inventory().

I will close it here since I think it's not a bug in obspy.

@heavelock It is true that we no longer recommend to use attach_response=True but nonetheless this is still something ObsPy supports for legacy reason so if there is some issue there we should at least be aware of it.

@CoralieAubert What exactly is the error message you are seeing?

I'm reopening this for now as we don't yet know if its a user error or an actual bug.

Hello Lion,

The function is working back fine since a couple of hours.
There was a fix at the datacenter here. The problem was coming from here
and I did not know about it...
Sorry for the disturb.
regards,

Le 29/01/2020 11:56, Lion Krischer a écrit :
>

@heavelock https://github.com/heavelock It is true that we no longer
recommend to use |attach_response=True| but nonetheless this is still
something ObsPy supports for legacy reason so if there is some issue
there we should at least be aware of it.

@CoralieAubert https://github.com/CoralieAubert What exactly is the
error message you are seeing?

I'm reopening this for now as we don't yet know if its a user error or
an actual bug.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/obspy/obspy/issues/2538?email_source=notifications&email_token=AICVQC4ZECWMHM4W5XVAOD3RAFOHBA5CNFSM4KMW4ZTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKGY54Q#issuecomment-579702514,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AICVQC5ZR7TYKI2GFG4RPHLRAFOHBANCNFSM4KMW4ZTA.

--
Coralie Aubert
Institut des Sciences de la Terre
Maison des Géosciences
1381 rue de la piscine
38400 Saint Martin d-Hères
FRANCE
Tel : 04.76.63.51.14
Tel : 06 14 83 07 05

Thanks for letting us know!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frodo4fingers picture frodo4fingers  Â·  6Comments

jschaeff picture jschaeff  Â·  10Comments

bgoutorbe picture bgoutorbe  Â·  10Comments

d-chambers picture d-chambers  Â·  6Comments

ThomasLecocq picture ThomasLecocq  Â·  5Comments