diff options
author | Thomas White <taw@physics.org> | 2011-03-07 17:31:30 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:18 +0100 |
commit | 33798dda6cce6c5d14df912ba11ff86fb4de0d40 (patch) | |
tree | 7c4056cb468053778c99c4a7c2283013797194f9 /src/detector.c | |
parent | 91fcc695e253eb1085b55f0ff0978a9f0379cd8d (diff) |
Remove hardcoded resolution limit in find_intersections()
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c index dfff82a3..a8a5c26e 100644 --- a/src/detector.c +++ b/src/detector.c @@ -661,6 +661,32 @@ static void check_extents(struct panel p, double *min_x, double *min_y, } +double largest_q(struct image *image) +{ + int fs, ss; + double ttm = 0.0; + double qmax = 0.0; + + for ( fs=0; fs<image->width; fs++ ) { + for ( ss=0; ss<image->height; ss++ ) { + + struct rvec q; + double tt; + + q = get_q(image, fs, ss, &tt, 1.0/image->lambda); + + if ( tt > ttm ) { + qmax = modulus(q.u, q.v, q.w); + ttm = tt; + } + + } + } + + return qmax; +} + + void get_pixel_extents(struct detector *det, double *min_x, double *min_y, double *max_x, double *max_y) |