Skip to content

Commit

Permalink
Divide by 2pi in MWCS
Browse files Browse the repository at this point in the history
  • Loading branch information
tclements committed Jul 1, 2019
1 parent 332a6a8 commit aafc35a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/VelocityChange/MWCS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ function mwcs(ref::AbstractArray,cur::AbstractArray,fmin::Float64,
end

# preprocess
Noise.demean!(cci)
Noise.detrend!(cci)
Noise.taper!(cci,fs,max_percentage=0.425)
Noise.demean!(cri)
Noise.detrend!(cri)
Noise.taper!(cri,fs,max_percentage=0.425)
SeisNoise.demean!(cci)
SeisNoise.detrend!(cci)
SeisNoise.taper!(cci,fs,max_percentage=0.425)
SeisNoise.demean!(cri)
SeisNoise.detrend!(cri)
SeisNoise.taper!(cri,fs,max_percentage=0.425)

# take fourier transform with padding
fcur = rfft([cci;zeros(eltype(cci),padd-size(cci)[1],N)],1)
Expand Down Expand Up @@ -163,6 +163,8 @@ function mwcs(ref::AbstractArray,cur::AbstractArray,fmin::Float64,
sx2 = sum(w[:,ii] .* v.^2)
err[ii] = sqrt(e * s2x2 / sx2^2)
end
dt ./= 2π
err ./= 2π
return time_axis, dt, err, mcoh
end

Expand Down

0 comments on commit aafc35a

Please sign in to comment.