aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-11-16 09:49:05 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:05 +0100
commit5447d802f6c8baedf350c2fe002757b390e7c8da (patch)
tree1054e0947cef49c871b9c6a021586500921d9a71
parent684a946c37e74971f1466078536228d46a6467b1 (diff)
Tidy up previous commit
-rw-r--r--src/peaks.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/peaks.c b/src/peaks.c
index b30c4815..c75ffd21 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -530,11 +530,6 @@ int find_projected_peaks(struct image *image, UnitCell *cell,
double dist;
int found = 0;
int j;
- struct panel *p;
-
- p = find_panel(image->det, x, y);
- if ( p == NULL ) continue;
- if ( p->no_index ) continue;
q = get_q(image, x, y, 1, NULL, 1.0/image->lambda);
@@ -741,6 +736,12 @@ void output_intensities(struct image *image, UnitCell *cell,
double d;
int idx;
double bg, max;
+ struct panel *p;
+
+ p = find_panel(image->det, image->cpeaks[i].x,
+ image->cpeaks[i].y);
+ if ( p == NULL ) continue;
+ if ( p->no_index ) continue;
/* Wait.. is there a really close feature which was detected? */
if ( use_closer ) {
@@ -909,6 +910,11 @@ void output_pixels(struct image *image, UnitCell *cell,
signed int h, k, l;
struct rvec q;
double dist;
+ struct panel *p;
+
+ p = find_panel(image->det, x, y);
+ if ( p == NULL ) continue;
+ if ( p->no_index ) continue;
q = get_q(image, x, y, 1, NULL, 1.0/image->lambda);