aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-08-28 04:29:43 -0700
committerThomas White <taw@physics.org>2012-02-22 15:27:42 +0100
commit2318ae07fa5baaead4c1bc55bc4e63694c1942dc (patch)
tree85a7397ad3f58e4d2d58a91eac0e5cc682e02282 /libcrystfel/src/peaks.c
parent0f7fc1d4d2e8022a1166e17ccd694f1d1b855d67 (diff)
Hooks for estimation of maximum resolution for each image
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r--libcrystfel/src/peaks.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 82ce1cf3..0d72e514 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -290,6 +290,34 @@ int integrate_peak(struct image *image, int cfs, int css,
}
+void estimate_resolution(RefList *list, UnitCell *cell,
+ double *min, double *max)
+{
+ Reflection *refl;
+ RefListIterator *iter;
+
+ for ( refl = first_refl(list, &iter);
+ refl != NULL;
+ refl = next_refl(refl, iter) )
+ {
+ double one_over_d;
+ signed int h, k, l;
+
+ get_indices(refl, &h, &k, &l);
+ one_over_d = 2.0 * resolution(cell, h, k, l);
+
+ if ( one_over_d > *max ) *max = one_over_d;
+ if ( one_over_d < *min ) *min = one_over_d;
+
+ /* FIXME: Implement this */
+
+ }
+
+ *min = 0.0;
+ *max = 0.0;
+}
+
+
static void search_peaks_in_panel(struct image *image, float threshold,
float min_gradient, float min_snr,
struct panel *p)