aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-26 17:48:47 +0100
committerThomas White <taw@physics.org>2014-03-26 17:48:47 +0100
commitfddfbb4fd069d914865afc53053574b87ba2d552 (patch)
tree6523ca8cd5d9c1c65d4064b433e4197f41aad8ac /libcrystfel
parent372c7db873ffbc538591d66ff1c7a1fc5d390a65 (diff)
indexamajig: Don't check SNR with --peaks=hdf5 unless given --check-hdf5-snr
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/peaks.c5
-rw-r--r--libcrystfel/src/peaks.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 0f5d96a6..6e5d09dd 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -661,7 +661,8 @@ int peak_sanity_check(struct image *image, Crystal **crystals, int n_cryst)
void validate_peaks(struct image *image, double min_snr,
- int ir_inn, int ir_mid, int ir_out, int use_saturated)
+ int ir_inn, int ir_mid, int ir_out, int use_saturated,
+ int check_snr)
{
int i, n;
ImageFeatureList *flist;
@@ -718,7 +719,7 @@ void validate_peaks(struct image *image, double min_snr,
continue;
}
- if ( fabs(intensity)/sigma < min_snr ) {
+ if ( check_snr && (fabs(intensity)/sigma < min_snr) ) {
n_snr++;
continue;
}
diff --git a/libcrystfel/src/peaks.h b/libcrystfel/src/peaks.h
index 09ad5245..433f7d1f 100644
--- a/libcrystfel/src/peaks.h
+++ b/libcrystfel/src/peaks.h
@@ -50,7 +50,7 @@ extern int peak_sanity_check(struct image *image, Crystal **crystals,
extern void validate_peaks(struct image *image, double min_snr,
int ir_inn, int ir_mid, int ir_out,
- int use_saturated);
+ int use_saturated, int check_snr);
extern int integrate_peak(struct image *image, int cfs, int css,
double *pfs, double *pss,