SeisNoise.jl icon indicating copy to clipboard operation
SeisNoise.jl copied to clipboard

process_raw! fails on NodalData

Open stepholinger opened this issue 2 years ago • 2 comments

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.

stepholinger avatar Feb 01 '23 22:02 stepholinger

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...

tclements avatar Feb 02 '23 20:02 tclements

I agree, that would make sense.

stepholinger avatar Feb 03 '23 18:02 stepholinger