Skip to content

Commit

Permalink
Merge pull request #32 from bionanoimaging/fix_reample_czt
Browse files Browse the repository at this point in the history
remove comment in test and changed czt input type requirement.
  • Loading branch information
roflmaostc authored Feb 8, 2023
2 parents 914aa00 + 3365143 commit de6204a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/czt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ julia> zoomed = real.(ift(xft))
0.0239759 -0.028264 0.0541186 -0.0116475 -0.261294 0.312719 -0.261294 -0.0116475 0.0541186 -0.028264
```
"""
function czt(xin::Array{T,N}, scale, dims=1:length(size(xin));
remove_wrap=false)::Array{complex(T),N} where {T,N}
function czt(xin::AbstractArray{T,N}, scale, dims=1:length(size(xin));
remove_wrap=false)::AbstractArray{complex(T),N} where {T,N}
xout = xin
if length(scale) != ndims(xin)
error("Every of the $(ndims(xin)) dimension needs exactly one corresponding scale (zoom) factor, which should be equal to 1.0 for dimensions not contained in the dims argument.")
Expand Down
1 change: 0 additions & 1 deletion test/czt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ using NDTools # this is needed for the select_region! function below.
# check if the remove_wrap works
@test abs(czt(y,zoom; remove_wrap=true)[1,1]) == 0.0
@test abs(iczt(y,zoom; remove_wrap=true)[1,1]) == 0.0
# @vt czt(y,zoom) select_region(upsample2(ft(y), fix_center=true), new_size=size(y))
end
end

2 comments on commit de6204a

@roflmaostc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/77346

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" de6204afa90e0f91b73961e8f479f9a8e6757999
git push origin v0.4.0

Please sign in to comment.