It fixes some depreciated (related to scipy, eqcorrscan) and some now no longer supported syntax (related to obspy 2.0 and h5py).
Why was it initiated? Any relevant Issues?
Obspy's master-branch contains changes that will come fully into effect with the release of obspy 2.0. Some of these changes break current syntax and tests in EQcorrscan.
As SDSclient now has a read_waveform_bulk-function, this now tests EQcorrscan's monkey-patching on the Earthworm.client
One change to the tests concerns using obspy.signal.cross_correlation.correlate and obspy.signal.cross_correlation.xcorr_max instead of the now no longer existant obspy.signal.cross_correlation.xcorr (PR #1979 in Obspy). As a note (discussions would best fit in Obspy repo): If two traces, one with an even and one with uneven number of samples, are correlated, then the new .xcorr_max function will return for the index of the maximum correlation an index that ends in .5 instead of an integer. Then the user has to do the rounding to be able to use it as an index in an array.
PR Checklist
[X] develop base branch selected?
[X] This PR is not directly related to an existing issue (which has no PR yet).
[X] All tests still pass.
[X] Any new features or fixed regressions are be covered via new tests.
[X] Any new or changed features have are fully documented.
[X] Significant changes have been added to CHANGES.md.
[X] First time contributors have added your name to CONTRIBUTORS.md.
What does this PR do?
It fixes some depreciated (related to
scipy
,eqcorrscan
) and some now no longer supported syntax (related toobspy 2.0
andh5py
).Why was it initiated? Any relevant Issues?
Obspy's
master
-branch contains changes that will come fully into effect with the release ofobspy 2.0
. Some of these changes break current syntax and tests in EQcorrscan.SDSclient
now has aread_waveform_bulk
-function, this now tests EQcorrscan's monkey-patching on theEarthworm.client
obspy.signal.cross_correlation.correlate
andobspy.signal.cross_correlation.xcorr_max
instead of the now no longer existantobspy.signal.cross_correlation.xcorr
(PR #1979 in Obspy). As a note (discussions would best fit in Obspy repo): If two traces, one with an even and one with uneven number of samples, are correlated, then the new.xcorr_max
function will return for the index of the maximum correlation an index that ends in .5 instead of an integer. Then the user has to do the rounding to be able to use it as an index in an array.PR Checklist
develop
base branch selected?Any new features or fixed regressions are be covered via new tests.Any new or changed features have are fully documented.Significant changes have been added toCHANGES.md
.First time contributors have added your name toCONTRIBUTORS.md
.