You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for providing this great library that really helps study earthquake source properties. While you state clearly in the doc string of mtspec that the "spectrum" is the PSD, the definition of "spectral_ratio" returned by the mt_deconvolve function is not stated, which can lead to quite bad mistakes in analyses.
The word "spectrum" is a confusing word as people freely use it to talk about different physical quantities. The documentation says that "spectral_ratio" is the ratio of the two spectra, and says that "spectrum_a" and "spectrum_b" are the spectra of the time series a and b, respectively. However, a simple test can show that spectrum_a/spectrum_b does not give spectral_ratio, instead it is equal to the square root of that: sqrt(spectrum_a/spectrum_b). I believe that this is the desired behavior for spectral_ratio, as what we want is the ratio between the Fourier transform of the two source terms, and not the ratio between the PSD of the two source terms. But this is in complete contradiction with the definition of "spectrum" used for "spectrum_a" and "spectrum_b", and given in the rest of the library.
I suggest to explicitly say in the docstring of mt_deconvolve that "spectrum_a" and "spectrum_b" are PSDs, whereas "spectral_ratio" is the ratio of the two moduli of the Fourier transforms (or anything that would clarify this).
Thanks!
Eric
The text was updated successfully, but these errors were encountered:
Hi,
Thank you for providing this great library that really helps study earthquake source properties. While you state clearly in the doc string of mtspec that the "spectrum" is the PSD, the definition of "spectral_ratio" returned by the mt_deconvolve function is not stated, which can lead to quite bad mistakes in analyses.
The word "spectrum" is a confusing word as people freely use it to talk about different physical quantities. The documentation says that "spectral_ratio" is the ratio of the two spectra, and says that "spectrum_a" and "spectrum_b" are the spectra of the time series a and b, respectively. However, a simple test can show that spectrum_a/spectrum_b does not give spectral_ratio, instead it is equal to the square root of that: sqrt(spectrum_a/spectrum_b). I believe that this is the desired behavior for spectral_ratio, as what we want is the ratio between the Fourier transform of the two source terms, and not the ratio between the PSD of the two source terms. But this is in complete contradiction with the definition of "spectrum" used for "spectrum_a" and "spectrum_b", and given in the rest of the library.
I suggest to explicitly say in the docstring of mt_deconvolve that "spectrum_a" and "spectrum_b" are PSDs, whereas "spectral_ratio" is the ratio of the two moduli of the Fourier transforms (or anything that would clarify this).
Thanks!
Eric
The text was updated successfully, but these errors were encountered: