JuliaSeismo / SeisNoise.jl

Ambient Noise Cross-Correlation in Julia
MIT License
55 stars 18 forks source link

process_raw! fails on NodalData #104

Open stepholinger opened 1 year ago

stepholinger commented 1 year ago

When the process_raw! function is applied to NodalData, the following error is produced:

MethodError: no method matching process_raw!(::SeisIO.Nodal.NodalData, ::Float64)
Closest candidates are:
  process_raw!(::SeisData, ::Real; ϕshift) at ~/.julia/packages/SeisNoise/E7Pc3/src/compute_fft.jl:20
  process_raw!(::SeisChannel, ::Real; ϕshift) at ~/.julia/packages/SeisNoise/E7Pc3/src/compute_fft.jl:51

Stacktrace:
 [1] top-level scope
   @ In[10]:1

Applying detrend!, taper! and bandpass! to NodalData works fine, so it may be a simple matter of adding NodalData as an acceptable input type for process_raw!, or defining a new function to specifically handle the NodalData.

tclements commented 1 year ago

Thanks for finding this! I'm leaning towards deprecating process_raw in favor of applying individual processing functions (detrend, taper, bandpass). I think that leads to more understandable code. I need to update the docs to reflect that...

stepholinger commented 1 year ago

I agree, that would make sense.