source_residuals crashes with ValueError: x and y arrays must be equal in length after BH inversion on noisy stations #92
Unanswered
wangzb0329
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @claudio-satriano
First of all, thank you so much for developing SourceSpec. It's a brilliant tool and has been central to my research on regional earthquakes!
I'm currently running into an issue during the source_residuals step and would love to get your advice to see if I am doing something wrong, or if this is an expected edge case.
After running a batch of events (Mw 4.0 - 5.5) using the Basin-hopping (BH) algorithm, I try to compute the mean station residuals. However, the process consistently crashes on one specific noisy station (CQ.CQT) with this SciPy error:
Python
Processing station: CQ.CQT.00.BHH
Traceback (most recent call last):
...
File "sourcespec/source_residuals.py", line 270, in compute_mean_residuals
spec_interp.interp_data_to_new_freq(freq_array)
File "sourcespec/spectrum.py", line 130, in _interpolate_data_to_new_freq
f = interp1d(freq, data, fill_value=fill_value, bounds_error=False)
File "scipy/interpolate/_polyint.py", line 128, in _set_yi
raise ValueError("x and y arrays must be equal in length along interpolation axis.")
ValueError: x and y arrays must be equal in length along interpolation axis.
To figure out what was happening, I did some testing:
Thank you so much for your time and guidance!
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions