From cc55abcff6e91d57e8226fa8a4265b667c20ceb0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 13 Oct 2016 17:03:05 +0200 Subject: validate_peaks(): Remove drifting and proximity checks, and use original coordinates We trust the HDF5 peaks, even if we can't see a peak there. That means we can't reliably take a centroid and "improve" the coordinates. In some cases, the centroiding procedure seems to be making the peak coordinates worse than they were originally. Now, the only remaining checks are: 1. Is the peak in a bad region of the detector? 2. Is it saturated? (but --use-saturated is the default) 3. If --check-hdf5-snr, is it above the minimum SNR? --- libcrystfel/src/peaks.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) (limited to 'libcrystfel/src/peaks.c') diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 7fc30ef7..cb2a9f5a 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -609,7 +609,7 @@ void validate_peaks(struct image *image, double min_snr, { int i, n; ImageFeatureList *flist; - int n_wtf, n_int, n_dft, n_snr, n_prx, n_sat; + int n_wtf, n_int, n_snr, n_sat; flist = image_feature_list_new(); if ( flist == NULL ) return; @@ -617,13 +617,11 @@ void validate_peaks(struct image *image, double min_snr, n = image_feature_count(image->features); /* Loop over peaks, putting each one through the integrator */ - n_wtf = 0; n_int = 0; n_dft = 0; n_snr = 0; n_prx = 0; n_sat = 0; + n_wtf = 0; n_int = 0; n_snr = 0; n_sat = 0; for ( i=0; i f->p->w) - || (f_ss < 0) || (f_ss > f->p->h) ) - { - n_dft++; - continue; - } - if ( check_snr && (fabs(intensity)/sigma < min_snr) ) { n_snr++; continue; } - /* Check for a nearby feature */ - image_feature_closest(flist, f_fs, f_ss, f->p, &d, &idx); - if ( d < 2.0*ir_inn ) { - n_prx++; - continue; - } - /* Add using "better" coordinates */ - image_add_feature(flist, f_fs, f_ss, f->p, image, intensity, + image_add_feature(flist, f->fs, f->ss, f->p, image, intensity, NULL); } - //STATUS("HDF5: %i peaks, validated: %i. WTF: %i, integration: %i," - // " drifted: %i, SNR: %i, proximity: %i, saturated: %i\n", - // n, image_feature_count(flist), - // n_wtf, n_int, n_dft, n_snr, n_prx, n_sat); + //STATUS("HDF5: %i peaks, validated: %i. WTF: %i, integration: %i, " + // "SNR: %i, saturated: %i\n", + // n, image_feature_count(flist), n_wtf, n_int, n_snr, n_sat); image_feature_list_free(image->features); image->features = flist; image->num_saturated_peaks = n_sat; -- cgit v1.2.3