Closed krisvanneste closed 1 year ago
Hi Kris, Thanks for this PR!
I'll look into it during the next few days 👍
Please note there has been an additional commit with a bug fix since the pull request. Let me know if I need to make the pull request again.
Please note there has been an additional commit with a bug fix since the pull request. Let me know if I need to make the pull request again.
Don't need to make the PR again: every new commit is automatically added to the PR.
Rebased on current main
and force-pushed. I'm doing some more edits..
Looks fine on my end, after a few edits.
Could you please check that it still works as intended? Thanks!
P.S. You will have to force-pull 😉
Is it OK if I do that tomorrow? I need to go home in a few minutes.
Of course!
It seems to work as before!
Great! Merged 😉
Claudio,
I implemented a third weighting option in sourcespec based on inverse frequency, so that lower frequencies have larger weight in the inversion. If traces contain noise, weights will be set to zero where SNR < 3.
Note that the weights are not strictly 1/f, but 1/(f-f0+0.25)**0.25 (with f0 corresponding to the first valid frequency in the spectrum). This ensures that the weight curves have a similar shape, regardless of the actual frequency range, and also that the few lowest frequencies do not receive extremely large weights with respect to the others.
Here is a plot showing what the spectral weights look like:
Could you run a test with your data to see how it behaves?
I also fixed a small bug which appears when setting the Qo_min_max configuration parameter. It's a separate commit, so you could also cherry-pick it.
Let me know what you think and if you can think of any improvements, let me know!
Kris