Skip to content

Commit

Permalink
make sinc/bessel and auto/cross consistent with fftshift
Browse files Browse the repository at this point in the history
  • Loading branch information
AshtonSBradley committed May 21, 2024
1 parent 0db392e commit 34b9983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function auto_correlate(ψ,X,K)
ifft!(ϕ)
dμk = prod(DK)*(2*π)^(n/2)
@. ϕ *= dμk
return ϕ
return ϕ |> fftshift
end

auto_correlate(psi::Psi{D}) where D = auto_correlate(psi.ψ,psi.X,psi.K)
Expand Down Expand Up @@ -326,7 +326,7 @@ function cross_correlate(ψ1,ψ2,X,K)
ifft!(ϕ1)
dμk = prod(DK)*(2*π)^(n/2)
ϕ1 .*= dμk
return ϕ1
return ϕ1 |> fftshift
end


Expand Down

0 comments on commit 34b9983

Please sign in to comment.