How to modify stationXML file

Dear all,

I am trying to remove instrument response using remove_response function and stationXML file.

The result itself is OK, except that the waveform precedes the original for about 0.1 second.

Now I am trying to change the stationXML file parameter for station and channel that I am using, to see how this effects the outcome. I changed the number in all tags and also the in tag, but there seems to be no effect.

Can anyone tell me, how to change stationXML file in such way, that it will effect the result?

Thanks for the answer in advance,

Miha

Hi Miha,

kind of hard to judge without an example. Can you send a long a short
code snippet + data if appropriate to help diagnose the issue? A couple
thoughts:

(1) Keep in mind that (especially if you use the pre_filt option)
instrument correction is not a causal procedure. ObsPy implements it as
a spectral division which might well introduce acausality.

(2) Did you have a look at the phase response? (inv.plot_response(0.001))?

(3) There might be a good reason for why the corrected trace is earlier
in time. I guess you already noticed that, but for example the
decimation stages can have a time delay and also indicate whether the it
has already been corrected for by the data center. If not, the
instrument correction should correctly shift them in time.

(4) If you don't have a very good reason, better don't modify the
StationXML files. There is probably a reason for these values.

Cheers!

Lion

Hi Lion,

Thank you for your fast response.
My question was awkwardly composed, the main problem is that after I remove response, the result is ahead of the original, and yes, then I tried
manually to change stationXML file, to see what happens with the delay.

Quanterra digitizers, that we are using, already correct delay, that occurs at digital analog conversion stage, therefore, the in
the stages in stationXML file is always 0.
Here is the link to this stationXML file(generated by Antelope 5.5) for specific station named CRES, and also the link the waveform

https://www.dropbox.com/s/xsg3owz9ogy2024/CRES_HHZ?dl=0

https://www.dropbox.com/s/745hkz88lsqxfus/CRES.xml?dl=0

Here is the code, where I implement everything

I apologize for the bug in my code, if you want to see the response for my channel of interest(HHZ), then the correct version of the last 2 lines of the code is:

Hi Miha,

The reason you cannot write corrected data into MSEED format is because standard MSEED is integer format.

Hope that helps!

Best,

Youngman

Yes, you are quite right.
In this example, the corrected waveform was so ahead the original, that it would produce big errors at seismic phases determination.

I looked at some other station with different seismometers and found out that the corrected waveforms are also ahead of the original but the difference is much smaller.

Thank you for explanation,

Miha

The reason you cannot write corrected data into MSEED format is because standard MSEED is integer format.

Minor note: miniSEED is not an integer only format. The payload, aka data, in miniSEED can be encoded as ASCII text, integers, 32-bit floats, 64-bit floats (aka doubles), compressed integers (Steim[12]) and a handful of older encodings. While the most common encodings are compressed integers, all of the others are part of the standard.

Thanks for the complement. I appreciate it!

Youngman