# HG changeset patch # User Tuomo Valkonen # Date 1606931698 18000 # Node ID a64766c44642434661c2c604c5a6fb5bdc2d00b3 # Parent be7cab83b14a02c17a47c4e68d4d2a4fba213a38 windowsize diff -r be7cab83b14a -r a64766c44642 src/PredictPDPS.jl --- a/src/PredictPDPS.jl Sat Dec 04 09:22:46 2021 +0200 +++ b/src/PredictPDPS.jl Wed Dec 02 12:54:58 2020 -0500 @@ -235,19 +235,21 @@ wp("sigma", (e_params.σ₀ == 1 ? "" : "$(e_params.σ₀)") * "\\sigma_{\\max}") end end -end +end function run_experiments(;visualise=true, recalculate=true, experiments, save_prefix=default_save_prefix, fullscreen=false, + windowsize=nothing, kwargs...) # Create visualisation if visualise rc = Channel(1) - visproc = Threads.@spawn bg_visualise_enhanced(rc, fullscreen=fullscreen) + visproc = Threads.@spawn bg_visualise_enhanced(rc, fullscreen=fullscreen, + windowsize=windowsize) bind(rc, visproc) vis = rc else @@ -334,7 +336,8 @@ visualise=true, recalculate=true, verbose_iter=10, - fullscreen=true, + fullscreen=false, + windowsize=(0.10*4/3, 0.10), kwargs...) end @@ -464,10 +467,14 @@ return st end -function bg_visualise_enhanced(rc; fullscreen=false) +function bg_visualise_enhanced(rc; fullscreen=false, windowsize=nothing) process_channel(rc) do d imgs, plot_movement, log, vhist = d - do_visualise(imgs, refresh=false, fullscreen=fullscreen) + try + do_visualise(imgs, refresh=false, fullscreen=fullscreen, windowsize=windowsize) + catch err + print(err) + end # Overlay movement GR.settextcolorind(5) GR.setcharheight(0.015)