Skip to content

Commit 5132ade

Browse files
authored
Refactor image regridding and optimization call
1 parent 806d30f commit 5132ade

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/image_extractor.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,14 @@ end
333333
if blur > 0.0
334334
image = VIDA.blur(image, blur) # INI: blur the image with Gaussian kernel of given fwhm
335335
end
336-
rimage = VIDA.regrid(image, μas2rad(200.0), μas2rad(200.0), 64, 64)
336+
rimage = regrid(image, imagepixels(μas2rad(200.0), μas2rad(200.0), 64, 64))
337337
cimage = VIDA.clipimage(0.0, rimage)
338338
div = VIDA.LeastSquares(cimage)
339339
t = @elapsed begin
340340
prob = VIDAProblem(div, template, lower, upper)
341341
xopt, _, _ = vida(prob, BBO_adaptive_de_rand_1_bin(); maxiters = 20_000)
342342
# xopt2, θ, divmin = vida(prob, CMAEvolutionStrategyOpt(); init_params=xopt, maxiters=1_000)
343-
xopt2, θ, divmin = vida(prob, ECA(; options = Options(f_calls_limit = 1000, f_tol = 1.0e-5)); init_params = xopt, use_initial = true)
343+
xopt2, θ, divmin = vida(prob, ECA(; options = Options(f_calls_limit = 1000, f_tol = 1.0e-5)); init_params = xopt)
344344
end
345345
println("This took $t seconds")
346346
println("The minimum divergence is $divmin")

0 commit comments

Comments
 (0)