aboutsummaryrefslogtreecommitdiff
path: root/inst/GUI
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-10-29 01:39:20 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2015-10-29 07:31:02 +0100
commit9ddd8dd2d03531ded7022a6e1ce2dbb5a29cd77e (patch)
tree196bf024cda0e9a9add818cd7e320f98d6bce302 /inst/GUI
parent197a7c87a5bffe7e34699c0455a6da9207770500 (diff)
First functional version of the model gallery
Diffstat (limited to 'inst/GUI')
-rw-r--r--inst/GUI/gmkin.R57
-rw-r--r--inst/GUI/png/DFOP,_no_mets.pngbin0 -> 1696 bytes
-rw-r--r--inst/GUI/png/DFOP,_one_met.pngbin0 -> 2299 bytes
-rw-r--r--inst/GUI/png/DFOP,_three_parallel_met.pngbin0 -> 2405 bytes
-rw-r--r--inst/GUI/png/DFOP,_three_parallel_mets.pngbin0 -> 2405 bytes
-rw-r--r--inst/GUI/png/DFOP,_three_sequential_and_parallel_mets.pngbin0 -> 2258 bytes
-rw-r--r--inst/GUI/png/DFOP,_three_sequential_mets.pngbin0 -> 1986 bytes
-rw-r--r--inst/GUI/png/DFOP,_two_parallel_mets.pngbin0 -> 2392 bytes
-rw-r--r--inst/GUI/png/DFOP,_two_sequential,_one_parallel_met.pngbin0 -> 2820 bytes
-rw-r--r--inst/GUI/png/DFOP,_two_sequential_mets.pngbin0 -> 2236 bytes
-rw-r--r--inst/GUI/png/FOMC,_no_mets.pngbin0 -> 1745 bytes
-rw-r--r--inst/GUI/png/FOMC,_one_met.pngbin0 -> 2335 bytes
-rw-r--r--inst/GUI/png/FOMC,_three_parallel_met.pngbin0 -> 2393 bytes
-rw-r--r--inst/GUI/png/FOMC,_three_parallel_mets.pngbin0 -> 2393 bytes
-rw-r--r--inst/GUI/png/FOMC,_three_sequential_and_parallel_mets.pngbin0 -> 2293 bytes
-rw-r--r--inst/GUI/png/FOMC,_three_sequential_mets.pngbin0 -> 2041 bytes
-rw-r--r--inst/GUI/png/FOMC,_two_parallel_mets.pngbin0 -> 2420 bytes
-rw-r--r--inst/GUI/png/FOMC,_two_sequential,_one_parallel_met.pngbin0 -> 2912 bytes
-rw-r--r--inst/GUI/png/FOMC,_two_sequential_mets.pngbin0 -> 2342 bytes
-rw-r--r--inst/GUI/png/HS,_no_mets.pngbin0 -> 1880 bytes
-rw-r--r--inst/GUI/png/HS,_one_met.pngbin0 -> 2295 bytes
-rw-r--r--inst/GUI/png/HS,_three_parallel_met.pngbin0 -> 2354 bytes
-rw-r--r--inst/GUI/png/HS,_three_parallel_mets.pngbin0 -> 2354 bytes
-rw-r--r--inst/GUI/png/HS,_three_sequential_and_parallel_mets.pngbin0 -> 2202 bytes
-rw-r--r--inst/GUI/png/HS,_three_sequential_mets.pngbin0 -> 1946 bytes
-rw-r--r--inst/GUI/png/HS,_two_parallel_mets.pngbin0 -> 2343 bytes
-rw-r--r--inst/GUI/png/HS,_two_sequential,_one_parallel_met.pngbin0 -> 2787 bytes
-rw-r--r--inst/GUI/png/HS,_two_sequential_mets.pngbin0 -> 2182 bytes
-rw-r--r--inst/GUI/png/SFO,_no_mets.pngbin0 -> 1871 bytes
-rw-r--r--inst/GUI/png/SFO,_one_met.pngbin0 -> 2224 bytes
-rw-r--r--inst/GUI/png/SFO,_three_parallel_met.pngbin0 -> 2321 bytes
-rw-r--r--inst/GUI/png/SFO,_three_parallel_mets.pngbin0 -> 2321 bytes
-rw-r--r--inst/GUI/png/SFO,_three_sequential_and_parallel_mets.pngbin0 -> 2173 bytes
-rw-r--r--inst/GUI/png/SFO,_three_sequential_mets.pngbin0 -> 1915 bytes
-rw-r--r--inst/GUI/png/SFO,_two_parallel_mets.pngbin0 -> 2304 bytes
-rw-r--r--inst/GUI/png/SFO,_two_sequential,_one_parallel_met.pngbin0 -> 2771 bytes
-rw-r--r--inst/GUI/png/SFO,_two_sequential_mets.pngbin0 -> 2129 bytes
-rw-r--r--inst/GUI/png/Water_sediment,_met_in_both.pngbin0 -> 2694 bytes
-rw-r--r--inst/GUI/png/Water_sediment,_met_in_sediment.pngbin0 -> 2094 bytes
-rw-r--r--inst/GUI/png/Water_sediment,_met_in_water.pngbin0 -> 2247 bytes
-rw-r--r--inst/GUI/png/Water_sediment_P-II.pngbin0 -> 1837 bytes
-rw-r--r--inst/GUI/png/workflow/gmkin_workflow_434x569.png (renamed from inst/GUI/gmkin_workflow_434x569.png)bin43317 -> 43317 bytes
42 files changed, 53 insertions, 4 deletions
diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R
index 33180ac..671283a 100644
--- a/inst/GUI/gmkin.R
+++ b/inst/GUI/gmkin.R
@@ -57,6 +57,9 @@ bl$set_panel_size("east", right_width)
center <- gnotebook(cont = bl, where = "center")
left <- gvbox(cont = bl, use.scrollwindow = TRUE, where = "west")
right <- gnotebook(cont = bl, use.scrollwindow = TRUE, where = "east")
+# right$add_handler("tabchange", handler = function(h, ...) {
+# if (svalue(h$obj) == 3) bl$set_panel_size("east", 1000)
+# })
# Helper functions {{{1
# Override function for making it possible to override original data points using the GUI {{{2
@@ -867,6 +870,11 @@ run_fit_handler <- function(h, ...) { #{{{3
}
reweight.method <- svalue(f.gg.opts.reweight.method)
if (reweight.method == "none") reweight.method = NULL
+# fit_progress_handler = function(x, y) {
+ # svalue(sb) <- x
+ # f.progress.evaluations$call_Ext("setText", x, FALSE)
+ # f.progress.evaluations$parent$do_layout()
+# }
ftmp <<- mkinfit(m.cur, override(ds.cur$data),
state.ini = iniparms,
fixed_initials = inifixed,
@@ -885,6 +893,7 @@ run_fit_handler <- function(h, ...) { #{{{3
reweight.max.iter = as.numeric(svalue(f.gg.opts.reweight.max.iter)),
method.modFit = svalue(f.gg.opts.method.modFit),
maxit.modFit = svalue(f.gg.opts.maxit.modFit)
+# progress_handler = fit_progress_handler
)
ftmp$optimised <<- TRUE
ftmp$ds <<- ds.cur
@@ -969,6 +978,10 @@ show_plot <- function(type) {
# Line 1 with buttons {{{3
f.run <- gbutton("Run fit", cont = f.config, handler = run_fit_handler,
ext.args = list(disabled = TRUE))
+f.progress.line <- ggroup(cont = f.config)
+f.progress.label <- glabel("Number of model evaluations:",
+ cont = f.progress.line)
+f.progress.evaluations <- glabel("0", cont = f.progress.line)
# Fit options forms {{{3
@@ -1137,18 +1150,54 @@ svalue(center) <- 1
workflow.gg <- ggroup(cont = right, label = "Workflow", width = 480, height = 570,
ext.args = list(layout = list(type="vbox", align = "center")))
-workflow.png <- get_tempfile(ext = ".png")
-file.copy(system.file("GUI/gmkin_workflow_434x569.png", package = "gmkin"), workflow.png)
-workflow.gi <- gimage(workflow.png, size = c(434, 569), label = "Workflow", cont = workflow.gg)
+workflow_url <- "/custom/gmkin_png/workflow/gmkin_workflow_434x569.png"
+workflow.gi <- gimage(workflow_url, size = c(434, 569), label = "Workflow", cont = workflow.gg)
# Data editor {{{2
ds.e.gdf <- gdf(ds.cur$data, label = "Data", name = "Kinetic data",
width = 488, height = 600, cont = right)
# Model Gallery {{{2
-m.g.gg <- ggroup(cont = right, label = "Model gallery", width = 480, height = 570,
+m.g.gg <- ggroup(cont = right, label = "Model gallery",
ext.args = list(layout = list(type="vbox", align = "center")))
+m.g.rows <- list()
+m.g.buttonrows <- list()
+m.g.fields <- list()
+m.g.buttons <- list()
+add_gallery_model_handler <- function(h, ...) {
+ i_j <- h$action
+ ws$add_m(UBA_model_gallery[[i_j[1]]][i_j[2]])
+ update_m.df()
+ m.i <- nrow(m.df)
+ svalue(c.m) <- m.df[m.i, "Name"]
+ m.cur <<- ws$m[[m.i]]
+ update_m_editor()
+ m.delete$call_Ext("enable")
+ m.copy$call_Ext("enable")
+ if (!is.null(svalue(ds.gtable, index = TRUE))) {
+ if (!is.na(svalue(ds.gtable))) f.conf$call_Ext("enable")
+ }
+ svalue(center) <- 3
+}
+for (i in 1:9) {
+ m.g.rows[[i]] <- ggroup(cont = m.g.gg, horizontal = TRUE)
+ m.g.buttonrows[[i]] <- ggroup(cont = m.g.gg, horizontal = TRUE)
+ m.g.fields[[i]] <- list()
+ m.g.buttons[[i]] <- list()
+ for (j in 1:4) {
+ model <- UBA_model_gallery[[i]][[j]]
+ m.url = paste0("/custom/gmkin_png/", gsub(" ", "_", model$name), ".png")
+ m.g.fields[[i]][[j]] <- gimage(m.url, width = 110,
+ height = if (i == 1) 135 else 220,
+ cont = m.g.rows[[i]])
+ m.g.buttons[[i]][[j]] <- gbutton(model$name, width = 110,
+ cont = m.g.buttonrows[[i]],
+ handler = add_gallery_model_handler,
+ action = c(i, j))
+ tooltip(m.g.buttons[[i]][[j]]) <- model$name
+ }
+}
# Plots {{{2
plot.gg <- ggroup(cont = right, label = "Plot", width = 480, height = 900,
ext.args = list(layout = list(type="vbox", align = "center")))
diff --git a/inst/GUI/png/DFOP,_no_mets.png b/inst/GUI/png/DFOP,_no_mets.png
new file mode 100644
index 0000000..c80c17c
--- /dev/null
+++ b/inst/GUI/png/DFOP,_no_mets.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_one_met.png b/inst/GUI/png/DFOP,_one_met.png
new file mode 100644
index 0000000..ff923d1
--- /dev/null
+++ b/inst/GUI/png/DFOP,_one_met.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_three_parallel_met.png b/inst/GUI/png/DFOP,_three_parallel_met.png
new file mode 100644
index 0000000..c9297a1
--- /dev/null
+++ b/inst/GUI/png/DFOP,_three_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_three_parallel_mets.png b/inst/GUI/png/DFOP,_three_parallel_mets.png
new file mode 100644
index 0000000..c9297a1
--- /dev/null
+++ b/inst/GUI/png/DFOP,_three_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_three_sequential_and_parallel_mets.png b/inst/GUI/png/DFOP,_three_sequential_and_parallel_mets.png
new file mode 100644
index 0000000..34ec5d7
--- /dev/null
+++ b/inst/GUI/png/DFOP,_three_sequential_and_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_three_sequential_mets.png b/inst/GUI/png/DFOP,_three_sequential_mets.png
new file mode 100644
index 0000000..016a754
--- /dev/null
+++ b/inst/GUI/png/DFOP,_three_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_two_parallel_mets.png b/inst/GUI/png/DFOP,_two_parallel_mets.png
new file mode 100644
index 0000000..34e6a2c
--- /dev/null
+++ b/inst/GUI/png/DFOP,_two_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_two_sequential,_one_parallel_met.png b/inst/GUI/png/DFOP,_two_sequential,_one_parallel_met.png
new file mode 100644
index 0000000..dd1332f
--- /dev/null
+++ b/inst/GUI/png/DFOP,_two_sequential,_one_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/DFOP,_two_sequential_mets.png b/inst/GUI/png/DFOP,_two_sequential_mets.png
new file mode 100644
index 0000000..931b0ff
--- /dev/null
+++ b/inst/GUI/png/DFOP,_two_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_no_mets.png b/inst/GUI/png/FOMC,_no_mets.png
new file mode 100644
index 0000000..a1d4158
--- /dev/null
+++ b/inst/GUI/png/FOMC,_no_mets.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_one_met.png b/inst/GUI/png/FOMC,_one_met.png
new file mode 100644
index 0000000..f1d0c5f
--- /dev/null
+++ b/inst/GUI/png/FOMC,_one_met.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_three_parallel_met.png b/inst/GUI/png/FOMC,_three_parallel_met.png
new file mode 100644
index 0000000..75023bc
--- /dev/null
+++ b/inst/GUI/png/FOMC,_three_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_three_parallel_mets.png b/inst/GUI/png/FOMC,_three_parallel_mets.png
new file mode 100644
index 0000000..75023bc
--- /dev/null
+++ b/inst/GUI/png/FOMC,_three_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_three_sequential_and_parallel_mets.png b/inst/GUI/png/FOMC,_three_sequential_and_parallel_mets.png
new file mode 100644
index 0000000..98c4ca2
--- /dev/null
+++ b/inst/GUI/png/FOMC,_three_sequential_and_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_three_sequential_mets.png b/inst/GUI/png/FOMC,_three_sequential_mets.png
new file mode 100644
index 0000000..929e642
--- /dev/null
+++ b/inst/GUI/png/FOMC,_three_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_two_parallel_mets.png b/inst/GUI/png/FOMC,_two_parallel_mets.png
new file mode 100644
index 0000000..9852399
--- /dev/null
+++ b/inst/GUI/png/FOMC,_two_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_two_sequential,_one_parallel_met.png b/inst/GUI/png/FOMC,_two_sequential,_one_parallel_met.png
new file mode 100644
index 0000000..9096acd
--- /dev/null
+++ b/inst/GUI/png/FOMC,_two_sequential,_one_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/FOMC,_two_sequential_mets.png b/inst/GUI/png/FOMC,_two_sequential_mets.png
new file mode 100644
index 0000000..49d0a4a
--- /dev/null
+++ b/inst/GUI/png/FOMC,_two_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/HS,_no_mets.png b/inst/GUI/png/HS,_no_mets.png
new file mode 100644
index 0000000..21c10fe
--- /dev/null
+++ b/inst/GUI/png/HS,_no_mets.png
Binary files differ
diff --git a/inst/GUI/png/HS,_one_met.png b/inst/GUI/png/HS,_one_met.png
new file mode 100644
index 0000000..279867b
--- /dev/null
+++ b/inst/GUI/png/HS,_one_met.png
Binary files differ
diff --git a/inst/GUI/png/HS,_three_parallel_met.png b/inst/GUI/png/HS,_three_parallel_met.png
new file mode 100644
index 0000000..c7494b8
--- /dev/null
+++ b/inst/GUI/png/HS,_three_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/HS,_three_parallel_mets.png b/inst/GUI/png/HS,_three_parallel_mets.png
new file mode 100644
index 0000000..c7494b8
--- /dev/null
+++ b/inst/GUI/png/HS,_three_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/HS,_three_sequential_and_parallel_mets.png b/inst/GUI/png/HS,_three_sequential_and_parallel_mets.png
new file mode 100644
index 0000000..97cf5c9
--- /dev/null
+++ b/inst/GUI/png/HS,_three_sequential_and_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/HS,_three_sequential_mets.png b/inst/GUI/png/HS,_three_sequential_mets.png
new file mode 100644
index 0000000..fea160d
--- /dev/null
+++ b/inst/GUI/png/HS,_three_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/HS,_two_parallel_mets.png b/inst/GUI/png/HS,_two_parallel_mets.png
new file mode 100644
index 0000000..c3790a8
--- /dev/null
+++ b/inst/GUI/png/HS,_two_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/HS,_two_sequential,_one_parallel_met.png b/inst/GUI/png/HS,_two_sequential,_one_parallel_met.png
new file mode 100644
index 0000000..049fce9
--- /dev/null
+++ b/inst/GUI/png/HS,_two_sequential,_one_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/HS,_two_sequential_mets.png b/inst/GUI/png/HS,_two_sequential_mets.png
new file mode 100644
index 0000000..9c8e24c
--- /dev/null
+++ b/inst/GUI/png/HS,_two_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_no_mets.png b/inst/GUI/png/SFO,_no_mets.png
new file mode 100644
index 0000000..5704bcc
--- /dev/null
+++ b/inst/GUI/png/SFO,_no_mets.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_one_met.png b/inst/GUI/png/SFO,_one_met.png
new file mode 100644
index 0000000..a1e001b
--- /dev/null
+++ b/inst/GUI/png/SFO,_one_met.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_three_parallel_met.png b/inst/GUI/png/SFO,_three_parallel_met.png
new file mode 100644
index 0000000..1907460
--- /dev/null
+++ b/inst/GUI/png/SFO,_three_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_three_parallel_mets.png b/inst/GUI/png/SFO,_three_parallel_mets.png
new file mode 100644
index 0000000..1907460
--- /dev/null
+++ b/inst/GUI/png/SFO,_three_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_three_sequential_and_parallel_mets.png b/inst/GUI/png/SFO,_three_sequential_and_parallel_mets.png
new file mode 100644
index 0000000..808875f
--- /dev/null
+++ b/inst/GUI/png/SFO,_three_sequential_and_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_three_sequential_mets.png b/inst/GUI/png/SFO,_three_sequential_mets.png
new file mode 100644
index 0000000..4f9ee2f
--- /dev/null
+++ b/inst/GUI/png/SFO,_three_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_two_parallel_mets.png b/inst/GUI/png/SFO,_two_parallel_mets.png
new file mode 100644
index 0000000..b27489c
--- /dev/null
+++ b/inst/GUI/png/SFO,_two_parallel_mets.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_two_sequential,_one_parallel_met.png b/inst/GUI/png/SFO,_two_sequential,_one_parallel_met.png
new file mode 100644
index 0000000..f6a0cb9
--- /dev/null
+++ b/inst/GUI/png/SFO,_two_sequential,_one_parallel_met.png
Binary files differ
diff --git a/inst/GUI/png/SFO,_two_sequential_mets.png b/inst/GUI/png/SFO,_two_sequential_mets.png
new file mode 100644
index 0000000..854d6bc
--- /dev/null
+++ b/inst/GUI/png/SFO,_two_sequential_mets.png
Binary files differ
diff --git a/inst/GUI/png/Water_sediment,_met_in_both.png b/inst/GUI/png/Water_sediment,_met_in_both.png
new file mode 100644
index 0000000..74ea0e7
--- /dev/null
+++ b/inst/GUI/png/Water_sediment,_met_in_both.png
Binary files differ
diff --git a/inst/GUI/png/Water_sediment,_met_in_sediment.png b/inst/GUI/png/Water_sediment,_met_in_sediment.png
new file mode 100644
index 0000000..81caa93
--- /dev/null
+++ b/inst/GUI/png/Water_sediment,_met_in_sediment.png
Binary files differ
diff --git a/inst/GUI/png/Water_sediment,_met_in_water.png b/inst/GUI/png/Water_sediment,_met_in_water.png
new file mode 100644
index 0000000..c668c0c
--- /dev/null
+++ b/inst/GUI/png/Water_sediment,_met_in_water.png
Binary files differ
diff --git a/inst/GUI/png/Water_sediment_P-II.png b/inst/GUI/png/Water_sediment_P-II.png
new file mode 100644
index 0000000..08e2c72
--- /dev/null
+++ b/inst/GUI/png/Water_sediment_P-II.png
Binary files differ
diff --git a/inst/GUI/gmkin_workflow_434x569.png b/inst/GUI/png/workflow/gmkin_workflow_434x569.png
index a18f48f..a18f48f 100644
--- a/inst/GUI/gmkin_workflow_434x569.png
+++ b/inst/GUI/png/workflow/gmkin_workflow_434x569.png
Binary files differ

Contact - Imprint