aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/hdf5-file.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-09-07 16:49:42 +0200
committerThomas White <taw@physics.org>2017-09-15 14:31:01 +0200
commit3f1c6a1fbc241721aafeb9e1e6c0cbdb1eb810b5 (patch)
tree2da1af45a97cb9f99c52f336cc056880a70e9724 /libcrystfel/src/hdf5-file.c
parent71659b553db6b4edda325bbfd2b39a59fd0fff0f (diff)
Fix uninitialised peak counts (for info in stream only)
Diffstat (limited to 'libcrystfel/src/hdf5-file.c')
-rw-r--r--libcrystfel/src/hdf5-file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index 13339506..6fc10357 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -409,6 +409,8 @@ int get_peaks_cxi_2(struct image *image, struct hdfile *f, const char *p,
}
image->features = image_feature_list_new();
+ image->num_peaks = 0;
+ image->num_saturated_peaks = 0;
for ( pk=0; pk<num_peaks; pk++ ) {
float fs, ss, val;
@@ -427,6 +429,7 @@ int get_peaks_cxi_2(struct image *image, struct hdfile *f, const char *p,
ss = ss - p->orig_min_ss;
image_add_feature(image->features, fs, ss, p, image, val, NULL);
+ image->num_peaks++;
}
@@ -554,6 +557,8 @@ int get_peaks_2(struct image *image, struct hdfile *f, const char *p,
}
image->features = image_feature_list_new();
+ image->num_peaks = 0;
+ image->num_saturated_peaks = 0;
for ( i=0; i<size[0]; i++ ) {
float fs, ss, val;
@@ -573,6 +578,7 @@ int get_peaks_2(struct image *image, struct hdfile *f, const char *p,
image_add_feature(image->features, fs, ss, p, image, val,
NULL);
+ image->num_peaks++;
}