Skip to content

Commit

Permalink
Fix Type in Aowdt
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffFessler committed Sep 4, 2024
1 parent 75b1b4a commit 18a1e3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/regularize/Aodwt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ which is useful when imposing scale-dependent regularization
"""
function Aodwt(
dims::Dims ;
T::Type{<:Complex{<:AbstractFloat}} = ComplexF32,
T::Type{<:Union{AbstractFloat,Complex{<:AbstractFloat}}} = Float32,
level::Int = 3,
wt = wavelet(WT.haar),
operator::Bool = true, # !
Expand All @@ -52,7 +52,7 @@ function Aodwt(
mfun = (A, x) -> A * x
return mfun, LinearMapAA(forw!, back!,
(prod(dims), prod(dims)) ;
prop = (wt=wt, level=lev), T=T,
prop = (wt, level=lev), T,
operator = true, idim=dims, odim=dims,
)
else
Expand All @@ -63,7 +63,7 @@ function Aodwt(
# x -> vec(dwt(reshape(x, dims), wt, level)),
# y -> vec(idwt(reshape(y, dims), wt, level)),
(prod(dims), prod(dims)) ;
prop = (wt=wt, level=lev), T=T,
prop = (wt, level=lev), T,
)
end
end
Expand All @@ -72,7 +72,7 @@ function Aodwt(

scales = zeros(dims)
for il in 1:level
_,Al = mfunA(il)
_, Al = mfunA(il)
tmp = mfun(Al, ones(dims)) .== 0
scales += il * (tmp .& (scales .== 0))
end
Expand Down

0 comments on commit 18a1e3f

Please sign in to comment.