Skip to content

Commit

Permalink
Fix the bug of overwriting original signal
Browse files Browse the repository at this point in the history
  • Loading branch information
henry2004y committed May 7, 2021
1 parent 908586a commit 2d25f77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sift.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ function iterate(it::SiftIterable, iteration::Int=start(it))
it.y .-= subs

# Return the residual at item and iteration number as state
it.tol, iteration + 1
it.residual, iteration + 1
end

# Utility functions

function sift_iterator(y, x;
reltol::Real = 0.1,
maxiter::Int = 10,
maxiter::Int = 6,
stop_steps::Int = 4)
maxs, mins = Int[], Int[]
crosses = Int[]
Expand Down Expand Up @@ -121,7 +121,7 @@ function sift!(imf, y, x;
verbose::Bool = false,
kwargs...)

imf = y
imf .= y
# Actually perform sifting
iterable = sift_iterator(imf, x; reltol, maxiter, stop_steps)

Expand Down

0 comments on commit 2d25f77

Please sign in to comment.