diff options
author | Thomas White <taw@physics.org> | 2012-11-28 16:31:19 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-11-29 12:01:20 +0100 |
commit | 483e3d5883461f0572a181211b6aa306fd2bfdc0 (patch) | |
tree | 2ff96dfecc0e82aab5ad6dc231d37798cedc43dc /libcrystfel | |
parent | 1d7ab9644999e4ec44bd90fdd249515bf05770b3 (diff) |
indexamajig: Add --integrate-saturated
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/peaks.c | 14 | ||||
-rw-r--r-- | libcrystfel/src/peaks.h | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index bf6a92f0..f13c7245 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -293,10 +293,9 @@ static int integrate_peak(struct image *image, int cfs, int css, val = image->data[idx]; - /* Veto peak if it contains saturation in bg region */ + /* Check if peak contains saturation in bg region */ if ( use_max_adu && (val > p->max_adu) ) { if ( saturated != NULL ) *saturated = 1; - return 1; } bg_tot += val; @@ -353,10 +352,9 @@ static int integrate_peak(struct image *image, int cfs, int css, val = image->data[idx] - bg_mean; - /* Veto peak if it contains saturation */ + /* Check if peak contains saturation */ if ( use_max_adu && (val > p->max_adu) ) { if ( saturated != NULL ) *saturated = 1; - return 1; } pk_counts++; @@ -697,7 +695,8 @@ static struct integr_ind *sort_reflections(RefList *list, UnitCell *cell, /* Integrate the list of predicted reflections in "image" */ void integrate_reflections(struct image *image, int use_closer, int bgsub, double min_snr, - double ir_inn, double ir_mid, double ir_out) + double ir_inn, double ir_mid, double ir_out, + int integrate_saturated) { struct integr_ind *il; int n, i; @@ -794,7 +793,10 @@ void integrate_reflections(struct image *image, int use_closer, int bgsub, &intensity, &sigma, ir_inn, ir_mid, ir_out, 1, bgMasks[pnum], &saturated); - if ( saturated ) image->n_saturated++; + if ( saturated ) { + image->n_saturated++; + if ( !integrate_saturated ) r = 1; + } /* I/sigma(I) cutoff */ if ( intensity/sigma < min_snr ) r = 1; diff --git a/libcrystfel/src/peaks.h b/libcrystfel/src/peaks.h index 39fdf54c..ec76fd3b 100644 --- a/libcrystfel/src/peaks.h +++ b/libcrystfel/src/peaks.h @@ -43,7 +43,8 @@ extern void search_peaks(struct image *image, float threshold, extern void integrate_reflections(struct image *image, int use_closer, int bgsub, double min_snr, - double ir_inn, double ir_mid, double ir_out); + double ir_inn, double ir_mid, double ir_out, + int integrate_saturated); extern double peak_lattice_agreement(struct image *image, UnitCell *cell, double *pst); |