aboutsummaryrefslogtreecommitdiff
path: root/src/crystfel_gui.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-05 15:38:41 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:24 +0200
commita7057533b2d8dbccb2e29d7215a054e368d0b749 (patch)
tree4e6609003cabe2975ca3482c1afcf331eac6a299 /src/crystfel_gui.c
parentbd4ed1a96bcbaca39ad39ff6d31e4f1bbf8d74ee (diff)
Show the peaks in the image view
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r--src/crystfel_gui.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index eb3fa842..aba46e9a 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -149,7 +149,7 @@ static void update_peaks(struct crystfelproject *proj)
proj->peak_search_params.use_saturated);
crystfel_image_view_set_peaks(CRYSTFEL_IMAGE_VIEW(proj->imageview),
- image->features);
+ image->features, 0);
}
@@ -557,6 +557,7 @@ static gint first_frame_sig(GtkWidget *widget, struct crystfelproject *proj)
{
proj->cur_frame = 0;
update_imageview(proj);
+ update_peaks(proj);
return FALSE;
}
@@ -566,6 +567,7 @@ static gint prev_frame_sig(GtkWidget *widget, struct crystfelproject *proj)
if ( proj->cur_frame == 0 ) return FALSE;
proj->cur_frame--;
update_imageview(proj);
+ update_peaks(proj);
return FALSE;
}
@@ -575,6 +577,7 @@ static gint next_frame_sig(GtkWidget *widget, struct crystfelproject *proj)
if ( proj->cur_frame == proj->n_frames - 1 ) return FALSE;
proj->cur_frame++;
update_imageview(proj);
+ update_peaks(proj);
return FALSE;
}
@@ -583,6 +586,7 @@ static gint last_frame_sig(GtkWidget *widget, struct crystfelproject *proj)
{
proj->cur_frame = proj->n_frames - 1;
update_imageview(proj);
+ update_peaks(proj);
return FALSE;
}
@@ -765,6 +769,12 @@ int main(int argc, char *argv[])
proj.events = NULL;
proj.peak_params = NULL;
proj.peak_search_params.threshold = 800.0;
+ proj.peak_search_params.min_sq_gradient = 100000;
+ proj.peak_search_params.min_snr = 5.0;
+ proj.peak_search_params.pk_inn = 3.0;
+ proj.peak_search_params.pk_mid = 4.0;
+ proj.peak_search_params.pk_out = 5.0;
+ proj.peak_search_params.use_saturated = 1;
proj.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(proj.window), "CrystFEL");