diff options
author | Thomas White <taw@physics.org> | 2010-11-16 09:46:47 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:05 +0100 |
commit | 684a946c37e74971f1466078536228d46a6467b1 (patch) | |
tree | 2412282b9996b08d83d92f02dfb692b9244c5290 /src/peaks.c | |
parent | 07baa642d688b5d70df61615c7c3585733995f85 (diff) |
Honour --no-index (again), take peak separation in geometry file
Diffstat (limited to 'src/peaks.c')
-rw-r--r-- | src/peaks.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/peaks.c b/src/peaks.c index 7c91f817..b30c4815 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -339,10 +339,15 @@ void search_peaks(struct image *image, float threshold) double max; unsigned int did_something; int r; + struct panel *p; /* Overall threshold */ if ( data[x+width*y] < threshold ) continue; + p = find_panel(image->det, x, y); + if ( !p ) continue; + if ( p->no_index ) continue; + /* Ignore streak */ if ( in_streak(x, y) ) continue; @@ -387,12 +392,14 @@ void search_peaks(struct image *image, float threshold) } /* Abort if drifted too far from the foot point */ - if ( distance(mask_x, mask_y, x, y) > 50.0 ) break; + if ( distance(mask_x, mask_y, x, y) > p->peak_sep ) { + break; + } } while ( did_something ); /* Too far from foot point? */ - if ( distance(mask_x, mask_y, x, y) > 50.0 ) { + if ( distance(mask_x, mask_y, x, y) > p->peak_sep ) { nrej_dis++; continue; } @@ -429,7 +436,7 @@ void search_peaks(struct image *image, float threshold) /* Check for a nearby feature */ image_feature_closest(image->features, fx, fy, &d, &idx); - if ( d < 15.0 ) { + if ( d < p->peak_sep ) { nrej_pro++; continue; } @@ -523,6 +530,11 @@ 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); |