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
At the moment, resample! is about two orders of magnitude slower when applied to NodalData than to CorrData. The two result in very sightly different but essentially identical outputs. The example below should demonstrate the issue.
# choose original fs and new fs
fs = 100.
resample_fs = 10.
# generate some 'data'
sz = 500
data = rand(Float32,sz,sz)
# resample CorrData with same underlying data
C = CorrData(corr=data,fs=fs)
corr_time = @elapsed SeisNoise.resample!(C,resample_fs)
# resample NodalData with same underlying data
S = SeisNoise.NodalData()
S.data=data
S.fs=ones(sz).*fs
nodal_time = @elapsed SeisNoise.resample!(S,resample_fs)
# print results
print("CorrData time: ", corr_time, " s\n")
print("NodalData time: ", nodal_time, " s\n")
# verify the results are almost identical
print("Total difference: ",sum(C.corr-S.data))
CorrData time: 0.032703704 s
NodalData time: 3.133497156 s
Total difference: 7.137656e-6
At the moment, it seems to be faster to load data into a CorrData object, resample, and then put the data back into a NodalData object.
The text was updated successfully, but these errors were encountered:
I think the SeisIO method resample takes any type of geophysical data, so I'm probably inadvertently using that method. I attempted to make sure I wasn't calling the SeisIO method by using SeisNoise.resample instead of just resample, but there may be an import line in SeisNoise that's allowing me to access the SeisIO method.
At the moment, resample! is about two orders of magnitude slower when applied to NodalData than to CorrData. The two result in very sightly different but essentially identical outputs. The example below should demonstrate the issue.
At the moment, it seems to be faster to load data into a CorrData object, resample, and then put the data back into a NodalData object.
The text was updated successfully, but these errors were encountered: