--- a/src/PET/PET.jl Mon Apr 22 13:28:58 2024 +0300 +++ b/src/PET/PET.jl Wed Apr 24 11:34:09 2024 +0300 @@ -22,10 +22,7 @@ using ImageTools.ImFilter: gaussian # For PET -#using Colors -#using ColorTypes using ColorSchemes -#using PerceptualColourMaps ##################### # Load local modules @@ -107,6 +104,7 @@ handle_interrupt = true, init = :zero, plot_movement = false, + stable_interval = Set(0), ) const p_known₀_pet = ( @@ -115,23 +113,22 @@ shake = 1.0, rotation_factor = 0.075, rotation_noise_level = 0.0075, - α = 1.0, + α = 0.15, ρ̃₀ = 1.0, σ̃₀ = 1.0, δ = 0.9, - σ₀ = 0.5, + σ₀ = 1.0, τ₀ = 0.9, λ = 1, radondims = [128,64], sz = (256,256), scale = 1, c = 1.0, - sino_sparsity = 0.5, # Percentage of zero parts in the mask + sino_sparsity = 0.5, L = 300.0, L_experiment = false, - stable_interval = Set(0), - # stable_interval = union(Set(1:1000),Set(2500:3000)), - # stable_interval = union(Set(1000:2000),Set(3000:4000)), + #stable_interval = Set(0), + stable_interval = union(Set(1000:2000),Set(3500:4000)), ) const shepplogan = imgen_shepplogan_radon(p_known₀_pet.sz) @@ -221,7 +218,7 @@ function name(e::Experiment, p) ig = e.imgen # return "$(ig.name)_$(e.mod.identifier)_$(@sprintf "%x" hash(p))" - return "$(ig.name)_$(e.mod.identifier)_$(Int64(10000*p.σ₀))_$(Int64(10000*p.τ₀))" + return "$(ig.name)_$(e.mod.identifier)_$(Int64(100*p.α))_$(Int64(10000*p.σ₀))_$(Int64(10000*p.τ₀))" end function write_tex(texfile, e_params) @@ -308,8 +305,8 @@ # datafile = e_params.save_prefix * ".jld2" write_log(perffile, st.log, "# params = $(e_params)\n") - write_log(hififile, st.log_hifi, "# params = $(e_params)\n") - write_tex(texfile, e_params) + #write_log(hififile, st.log_hifi, "# params = $(e_params)\n") + #write_tex(texfile, e_params) # @save datafile x y st params end @@ -346,7 +343,7 @@ save_images=false, visualise=true, recalculate=true, - verbose_iter=1, + verbose_iter=50, fullscreen=true, kwargs...) end @@ -368,7 +365,7 @@ demo_petB7 = () -> demo(brainphantom_experiments_pdps_known[7]) # Zero dual -function batchrun_shepplogan(kwargs...) +function batchrun_shepplogan(;kwargs...) run_experiments(;experiments=shepplogan_experiments_all, save_results=true, save_images=true, @@ -377,7 +374,7 @@ kwargs...) end -function batchrun_brainphantom(kwargs...) +function batchrun_brainphantom(;kwargs...) run_experiments(;experiments=brainphantom_experiments_all, save_results=true, save_images=true, @@ -386,9 +383,9 @@ kwargs...) end -function batchrun_pet(kwargs...) - batchrun_shepplogan() - batchrun_brainphantom() +function batchrun_pet(;kwargs...) + batchrun_shepplogan(;kwargs...) + batchrun_brainphantom(;kwargs...) end ######################################################