No matching response found - instrumental response issue

Hello,

I am in the process of removing the instrumental response from a RS3D, but I am encountering an error that states “ValueError: No matching response information found.” Despite ensuring that the station name, channel, location, and network match the stats of the trace, the issue persists.

I have sourced the response file from FDSN and also downloaded the XML directly from the online platform. Unfortunately, neither of these files has resolved the error. To troubleshoot the problem, I’ve explored various solutions provided in responses to similar issues faced by others in 2021 and 2022. However, those efforts have not led to a resolution.

Please can you please help me to solve this problem.

Thank you very much.

Best regards,

Claire

2 Likes

Hello Claire, and welcome to our community!

Could you please share the Shake from which you are trying to remove the response? And, could you also share the code you are utilizing to do so?

I would like to try and replicate this issue on my local machine so that I can be of more help.
Thank you!

Hello,
For sure sorry for this missing.
I’m trying to apply the filter on :
‘RA97C’
The code I’m using is :

def fetch_daily_seismic_data(client, station, folder):
    rs = Client(client)
    endtime = UTCDateTime(date.today() ) #REUNION =UTC +4 ==> trace de 4h à 4h du mat
    starttime =  UTCDateTime(endtime - timedelta(days=1))
    st=Stream()
    for channel in ['EHZ','EHN','EHE'] : #EHZ/EHN/EHE Short Period 100 sps  
        tr = rs.get_waveforms('AM',station, '00', channel, starttime, endtime)
        net = tr[0].stats.network
        loc = tr[0].stats.location
        filename = generate_seismic_filename(net, station, loc, channel, 
                                             starttime)
        tr.write(os.path.join(folder, filename), format='MSEED')
        inventory = rs.get_stations(network='AM', station=station,channel=channel,
                               starttime=starttime, endtime=endtime,
                                 level="response")
        tr.remove_response(inventory=inv)
        tr.merge(method=0, interpolation_samples=0, fill_value=None)
        st.append(tr[0])
    return st, inventory

Thanks a lot for your help.

Claire

2 Likes

No problem at all, and thanks for the info! I have just reformatted the code so it becomes more readable.

I think I have found where the problem is. The code works fine, and does what is required, however, it is asking (within your timeframe) for data that does not exist. I’ll explain myself:

This station started streaming data to our servers @ 12:39:25UTC on 2023-09-28 (yesterday).
Your data request timeframe goes from today’s midnight (00:00:00UTC on 2023-09-29) to yesterday’s midnight (00:00:00UTC on 2023-09-28).

As you can see, there is a period between 00:00:00UTC yesterday and 12:39:25UTC yesterday where there is no data, and thus no instrument response available.

You can verify this if you modify this line

starttime =  UTCDateTime(endtime - timedelta(days=1))

to

starttime =  UTCDateTime(endtime - timedelta(hours=11))

Now the code works, and it correctly downloads and uses the response data to process the traces you have downloaded.

This is because the modified line translates to a datetime of 13:00:00UTC on 2023-09-28, where there is plenty of data available.

In conclusion, you can use this modified function to download data today, and then you can go back to your days=1 starttime tomorrow, where more than 24h of data will be present on server:

def fetch_daily_seismic_data(client, station, folder):
    rs = Client(client)
    endtime = UTCDateTime(date.today() ) #REUNION =UTC +4 ==> trace de 4h à 4h du mat
    starttime =  UTCDateTime(endtime - timedelta(hours=11))
    st=Stream()
    for channel in ['EHZ','EHN','EHE'] : #EHZ/EHN/EHE Short Period 100 sps  
        tr = rs.get_waveforms('AM',station, '00', channel, starttime, endtime)
        net = tr[0].stats.network
        loc = tr[0].stats.location
        filename = generate_seismic_filename(net, station, loc, channel, 
                                             starttime)
        tr.write(os.path.join(folder, filename), format='MSEED')
        inv = rs.get_stations(network='AM', station=station,channel=channel,
                               starttime=starttime, endtime=endtime,
                                 level="response")
        tr.remove_response(inventory=inv)
        tr.merge(method=0, interpolation_samples=0, fill_value=None)
        st.append(tr[0])
    return st, inventory

For anything else, I remain available.

1 Like

Oh Great, Thank you very much !

All the best

Claire

2 Likes

No problem at all; happy to help!