diff options
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) |