aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-11-28 17:31:21 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:42 +0100
commit220f6796e49dc842750d674b744f0f00129ada05 (patch)
tree877592f3f9574825ccc29ff730c6755c482f1079
parent83d7ce243a4443083fb614f5019b9b9ca2c74539 (diff)
I/sigma(I) should always be positive
Even in the contrived case that the intensity is negative.
-rw-r--r--libcrystfel/src/peaks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 8e0acce7..e94d87be 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -417,7 +417,7 @@ static void search_peaks_in_panel(struct image *image, float threshold,
continue;
}
- if ( intensity/sigma < min_snr ) {
+ if ( fabs(intensity)/sigma < min_snr ) {
nrej_snr++;
continue;
}