Skip to content

Commit

Permalink
Merge pull request #18 from gapatron/main
Browse files Browse the repository at this point in the history
Remove unused variable definitions to improve readability
  • Loading branch information
andrew-saydjari authored Jul 25, 2023
2 parents 7e7fc58 + 433c9e0 commit e37620f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/cov.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ Boxcar smooths an input image (or paddedview) `arr` with window size `widx` by
"""
function boxsmooth!(out::AbstractArray, arr::AbstractArray, tot::Array{T,1}, widx::Int, widy::Int) where T
(sx, sy) = size(arr)
Δx = (widx-1)÷2
Δy = (widy-1)÷2

for j=1:(sy-widy+1)
if (j==1)
for n = 1:widy
Expand Down Expand Up @@ -102,10 +101,6 @@ function cov_avg!(bimage, ism, bism, in_image; Np::Int=33, widx::Int=129, widy::
T = Float64
end

Δx = (widx-1)÷2
Δy = (widy-1)÷2
halfNp = (Np-1) ÷ 2

(sx1, sy1) = size(in_image)
tot = zeros(T,sx1);
boxsmooth!(bimage,in_image,tot,widx,widy)
Expand Down
3 changes: 1 addition & 2 deletions src/perstar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ every detection. Math may either be performed `Float32` or `Float64`.
- `widy::Int`: width of boxcar window in y which determines size of region used for samples for the local covariance estimate
"""
function build_cov!(cov::Array{T,2}::Array{T,1},cx::Int,cy::Int,bimage::Array{T,2},bism::Array{T,4},Np::Int,widx::Int,widy::Int) where T <:Union{Float32,Float64}
Δx = (widx-1)÷2
Δy = (widy-1)÷2

halfNp = (Np-1) ÷ 2
Δr, Δc = cx-(halfNp+1), cy-(halfNp+1)
# Δr, Δc = cx-(halfNp-1), cy-(halfNp-1)
Expand Down

0 comments on commit e37620f

Please sign in to comment.