New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Radiated energy and max_freq_Er #49
Comments
Hi Kris, I'm a bit surprised by the value of the noise spectrum integral when I cannot see how the integral can be that big, given that the noise is consistently two orders of magnitude below the signal for most of the spectrum. Any thoughts on that? Would it be possible for you to share a working example? |
By the way, these spectra are very strange: looks like you're using the response of a downsampled channel (nyquist at ~6 Hz) and what we see above 6 Hz is the antialiasing filter |
Claudio, I couldn't believe it either at first. Looking at the
Especially when using linear-spaced frequencies for the integration, it is understandable that if the noise spectrum is above the signal spectrum at the highest frequencies, this may result in a larger spectral integral, regardless of the situation at lower frequencies. You are right about the odd shape of the spectra. These are data for an earthquake in 1983 from the Graeffenberg array in Germany. It's the only digital data we have. I had another look at the instrument response, but there is no anti-alias stage, so if there was indeed one, it is not corrected. I will see if I can make a standalone example, but as I run everything on the fly without writing waveform data and event data, I need some time to figure out what is the best/easiest way to do this. I could also write the output spectra to miniseed files, but this will not preserve the header information contained inside. |
It's definitively the exponential term of the I understand that it's complicated for you to create a standalone example, don't worry. What's your suggestion to address this problem?
Please let me know your point of view 😉 |
A possible solution would be to add an option to estimate the radiated energy in a station-dependent spectral window (fmin, fmax) where the noise is below the signal. Then, there is already a finite-bandwidth correction term in the code, that can be applied. Currently it is applied only for f>fmax, but it should be possible to correct also for f<fmin, as discussed in Di Bona and Rovelli (1988) |
On a side note, your |
What I said above is not correct: I think the problem with your fit is the "hole" in the spectrum above 6 Hz: the spectral fit wants to go very low at high frequency to fit this hole and this leads to high I think you should window your spectra to an fmax of 6 Hz |
Claudio, |
Thanks, I will try imposing an fmax of 6 Hz. |
Ok, so I propose to rename the config parameter
What do you think? |
Curious to see the results 😉 |
Claudio, This is quite flexible and should address most cases. Maybe use |
Here is the result with When I lower the minimum frequency ( I also managed to generate a standalone example with the same function I use to run sourcespec. If you unzip the attached ZIP file in a folder, then you should be able to run it with the following command: |
The last example looks much better, and the One can see a bit of the effect of the high pass filter on the left side of the spectrum: maybe you can filter at lower frequencies, e.g. |
ok ! |
Here is a possible solution: bae2ddf There is however a problem when using So, if, for example, Do you remember why we made this choice? Shouldn't we compute |
P.S. I'm going to add new commits to introduce another feature in This should not affect the current issue. |
I will look into this tomorrow. |
Configuration parameter |
I will then change:
to
|
This could be more robust, but then option |
I think the option |
I think that in this case people should just use (station-specific) spectral windowing, i.e. the options I would keep my proposal above and maybe rename the following two config options for more clarity:
...or just keep the current names and explain them better in the config file comments. What do you think? |
OK, that's fine with me. Maybe a better explanation is sufficient. |
Ok, just pushed the latest commits. I guess we can close this 😉 |
The computation of radiated energy appears to be very sensitive to the choice of maximum frequency (configuration parameter
max_freq_Er
). With the default value of None, which implies using the full spectrum, computation of radiated energy fails in some cases, as shown in the plot below for stations GR.GRA1 and GR.GRC1. The log shows that this is becausenoise energy is larger than signal energy: skipping spectrum
. However, the noise spectrum is everywhere below the signal spectrum, except at the highest frequencies (> 9 Hz).I did some manual computations of the spectral integral of these spectra:
I was able to avoid this problem by setting fmax to
spectral_snratio_fmax
from the header of the signal spectrum (8.77 Hz in the case of GR.GRA1) in theradiated_energy_and_apparent_stress
function before computing the spectral integral.The text was updated successfully, but these errors were encountered: