aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/peaks.c5
-rw-r--r--libcrystfel/src/peaks.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 0d72e514..34e0b8ca 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -564,7 +564,7 @@ int peak_sanity_check(struct image *image)
/* Integrate the list of predicted reflections in "image" */
void integrate_reflections(struct image *image, int polar, int use_closer,
- int bgsub)
+ int bgsub, double min_snr)
{
Reflection *refl;
RefListIterator *iter;
@@ -606,6 +606,9 @@ void integrate_reflections(struct image *image, int polar, int use_closer,
&intensity, &bg, &max, &sigma, polar, 0,
bgsub);
+ /* I/sigma(I) cutoff */
+ if ( intensity/sigma < min_snr ) r = 0;
+
/* Record intensity and set redundancy to 1 on success */
if ( r == 0 ) {
set_int(refl, intensity);
diff --git a/libcrystfel/src/peaks.h b/libcrystfel/src/peaks.h
index 88dab26d..d52c75e4 100644
--- a/libcrystfel/src/peaks.h
+++ b/libcrystfel/src/peaks.h
@@ -25,7 +25,8 @@ extern void search_peaks(struct image *image, float threshold,
float min_gradient, float min_snr);
extern void integrate_reflections(struct image *image,
- int polar, int use_closer, int bgsub);
+ int polar, int use_closer, int bgsub,
+ double min_snr);
extern int peak_sanity_check(struct image * image);