aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-05-08 14:37:27 +0200
committerThomas White <taw@physics.org>2019-05-14 10:02:50 +0200
commit636eb6116961296791bae35c40fd9438aa946827 (patch)
treeb195c2c1e897d7d4c778a60bd81bd231819f70a7 /libcrystfel/src/stream.c
parent59770f9bffbd47de5b518244a6dfcfbdfc8dad09 (diff)
Remove image.num_peaks and num_saturated_peaks
These values were inconsistently set by different parts of the code, e.g. different peak search methods. num_saturated_peaks was even set during final integration. Now, the peak count is taken from the ImageFeatureList, so it's authoritative.
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 5aac2eab..6b8f3565 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -897,8 +897,7 @@ int write_chunk(Stream *st, struct image *i, struct imagefile *imfile,
}
- fprintf(st->fh, "num_peaks = %lli\n", i->num_peaks);
- fprintf(st->fh, "num_saturated_peaks = %lli\n", i->num_saturated_peaks);
+ fprintf(st->fh, "num_peaks = %i\n", image_feature_count(i->features));
fprintf(st->fh, "peak_resolution = %f nm^-1 or %f A\n",
i->peak_resolution/1e9, 1e10/i->peak_resolution);
if ( include_peaks ) {
@@ -1218,7 +1217,6 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf)
}
do {
- long long num_peaks;
int ser;
float div, bw;
@@ -1263,10 +1261,6 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf)
image->bw = bw;
}
- if ( sscanf(line, "num_peaks = %lld", &num_peaks) == 1 ) {
- image->num_peaks = num_peaks;
- }
-
if ( sscanf(line, "Image serial number: %i", &ser) == 1 ) {
image->serial = ser;
}