--- a/src/Stats.jl Thu Apr 25 14:57:54 2024 -0500 +++ b/src/Stats.jl Thu Apr 25 15:07:18 2024 -0500 @@ -41,16 +41,19 @@ return α, τ₀, σ₀ end -function calculate_statistics() - ImName = ("lighthouse200x300", "shepplogan256x256", "brainphantom256x256") - AlgName = ("dualscaling", "greedy","noprediction","primalonly","proximal","rotation","zerodual") +const default_imnames = ("lighthouse200x300", "shepplogan256x256", "brainphantom256x256") +const default_algnames = ("dualscaling", "greedy","noprediction","primalonly","proximal","rotation","zerodual") + +function calculate_statistics(;imnames=default_imnames, + algnames=default_algnames, + csv_path = "./img/summarystats.csv") mystart = 41 # Corresponds to the 500th iterate # Define an array to store results results = DataFrame(experiment = String[], α = Float64[], algorithm = String[], psnr_mean1 = Float64[], psnr_mean500 = Float64[], psnr_ci = String[], ssim_mean1 = Float64[], ssim_mean500 = Float64[], ssim_ci = String[]) - for imname in ImName - for algname in AlgName + for imname in imnames + for algname in algnames directory_path = "./img/" files = readdir(directory_path) filtered_files = filter(file -> startswith(file, "$(imname)_pdps_known_$(algname)") && endswith(file, ".txt"), files) @@ -97,7 +100,6 @@ end end sort!(results, [:experiment, :α]) - csv_path = "./img/summarystats.csv" if isfile(csv_path) rm(csv_path) end