From ee24b7f48571c2f56c72f75f2f510fd6e050a6e1 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 30 Sep 2019 15:20:02 +0200 Subject: WIP --- crystfel-demo.c | 41 ++++++++++++++++++ data/crystfel-demo.glade | 108 +---------------------------------------------- 2 files changed, 43 insertions(+), 106 deletions(-) diff --git a/crystfel-demo.c b/crystfel-demo.c index b4e1025..e201d19 100644 --- a/crystfel-demo.c +++ b/crystfel-demo.c @@ -264,6 +264,42 @@ gint detector_shift(GtkWidget *widget, struct crystfeldemo *demo) } +gint calc_fom(GtkWidget *widget, struct crystfeldemo *demo) +{ + GError *error = NULL; + GSubprocess *sub; + + sub = g_subprocess_new(G_SUBPROCESS_FLAGS_NONE, + &error, "xfce4-terminal", + "-x", "sh", + "calc-foms.sh", + NULL); + + if ( sub == NULL ) { + printf("Failed to start demo process\n"); + } + return 0; +} + + +gint show_reflist(GtkWidget *widget, struct crystfeldemo *demo) +{ + GError *error = NULL; + GSubprocess *sub; + + sub = g_subprocess_new(G_SUBPROCESS_FLAGS_NONE, + &error, "xfce4-terminal", + "-x", "sh", "-c", + "less ${CRYSTFEL_DEMO_FILES}/merged.hkl" + NULL); + + if ( sub == NULL ) { + printf("Failed to start demo process\n"); + } + return 0; +} + + static int change_to_tempdir() { char tmpdir[64]; @@ -343,6 +379,11 @@ int main(int argc, char *argv[]) gtk_builder_add_callback_symbol(builder, "detector_shift", G_CALLBACK(detector_shift)); + gtk_builder_add_callback_symbol(builder, "calc_fom", + G_CALLBACK(calc_fom)); + gtk_builder_add_callback_symbol(builder, "show_reflist", + G_CALLBACK(show_reflist)); + gtk_builder_connect_signals(builder, &demo); gtk_widget_show_all(window); gtk_main(); diff --git a/data/crystfel-demo.glade b/data/crystfel-demo.glade index 942cd52..a480fd6 100644 --- a/data/crystfel-demo.glade +++ b/data/crystfel-demo.glade @@ -514,6 +514,7 @@ True True True + True @@ -527,6 +528,7 @@ True True True + True @@ -562,112 +564,6 @@ 5 - - - True - True - - - True - False - 0 - none - - - True - False - 12 - - - True - False - vertical - 6 - - - True - False - partialator -i indexing.stream -o merged.hkl --model=xsphere - True - True - - - False - True - 0 - - - - - True - False - 8 - - - Show pobs/pcalc graphs - True - True - True - - - True - True - 0 - - - - - Show residual contour maps - True - True - True - - - True - True - 1 - - - - - False - True - 1 - - - - - - - - - True - False - Merge using post-refinement - - - - - - - - - - True - False - Bonus material (if enough time) - - - - - - - - False - True - 6 - - -- cgit v1.2.3