aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-26 16:11:15 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commitf2badf17cf22031bd80b2ebf537cb7133be1e815 (patch)
tree29e3ac807d0aa9b572f50ca2987e3f601ff61aa7 /src
parent1f09f01108cab24293b896758d0ab549f4b02ecf (diff)
Implement hdf5/cxi peak "revalidation" in GUI
Diffstat (limited to 'src')
-rw-r--r--src/crystfel_gui.c1
-rw-r--r--src/crystfel_gui.h1
-rw-r--r--src/gui_peaksearch.c11
3 files changed, 13 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index a567ddcf..2990c488 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -617,6 +617,7 @@ int main(int argc, char *argv[])
proj.peak_search_params.pk_mid = 4.0;
proj.peak_search_params.pk_out = 5.0;
proj.peak_search_params.half_pixel_shift = 1;
+ proj.peak_search_params.revalidate = 1;
proj.backend = backend_local;
proj.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
diff --git a/src/crystfel_gui.h b/src/crystfel_gui.h
index 077f900b..5ca37f8e 100644
--- a/src/crystfel_gui.h
+++ b/src/crystfel_gui.h
@@ -51,6 +51,7 @@ struct peak_params {
float pk_mid;
float pk_out;
int half_pixel_shift; /* cxi, hdf5 */
+ int revalidate;
};
struct crystfelproject;
diff --git a/src/gui_peaksearch.c b/src/gui_peaksearch.c
index 3aa9c3f6..7fb4680f 100644
--- a/src/gui_peaksearch.c
+++ b/src/gui_peaksearch.c
@@ -94,6 +94,14 @@ void update_peaks(struct crystfelproject *proj)
image->filename,
image->ev,
proj->peak_search_params.half_pixel_shift);
+ if ( proj->peak_search_params.revalidate ) {
+ validate_peaks(image,
+ proj->peak_search_params.min_snr,
+ proj->peak_search_params.pk_inn,
+ proj->peak_search_params.pk_mid,
+ proj->peak_search_params.pk_out,
+ 1, 0);
+ }
break;
default:
@@ -320,6 +328,9 @@ static void peaksearch_algo_changed(GtkWidget *combo,
add_check_param(proj->peak_params, "Half pixel shift",
&proj->peak_search_params.half_pixel_shift,
proj);
+ add_check_param(proj->peak_params, "Check peaks first",
+ &proj->peak_search_params.revalidate,
+ proj);
} else if ( strcmp(algo_id, "cxi") == 0 ) {
ERROR("algo_id should be hdf5, not cxi\n");