aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-05-27 11:35:56 +0200
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commit199f01b01f65d254fcb514516eaaf67866b66bcb (patch)
tree95e284871a65a2bc6208c846267c72043a24dfa0 /libcrystfel/src/peaks.c
parentaab8403884c4731f7365796de8f53315f4a61616 (diff)
Convert estimate_peak_resolution to detgeom
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r--libcrystfel/src/peaks.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 25697c43..de024b0d 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -733,7 +733,7 @@ static int compare_double(const void *av, const void *bv)
double estimate_peak_resolution(ImageFeatureList *peaks, double lambda,
- struct detector *det)
+ struct detgeom *det)
{
int i, npk, ncut;
double *rns;
@@ -751,13 +751,14 @@ double estimate_peak_resolution(ImageFeatureList *peaks, double lambda,
for ( i=0; i<npk; i++ ) {
struct imagefeature *f;
- struct rvec r;
+ double r[3];
f = image_get_feature(peaks, i);
- r = get_q_for_panel(&det->panels[f->pn],
- f->fs, f->ss, NULL, 1.0/lambda);
- rns[i] = modulus(r.u, r.v, r.w);
+ detgeom_transform_coords(&det->panels[f->pn],
+ f->fs, f->ss,
+ lambda, r);
+ rns[i] = modulus(r[0], r[1], r[2]);
}