diff options
author | Andrew Aquila <andrew.aquila@cfel.de> | 2011-03-28 16:09:43 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:27 +0100 |
commit | 9e74643aed68c2d221452a8912de48ce06135354 (patch) | |
tree | e7d3210a3f1c1b7d3368a4bb6df0940aceddae31 /src/detector.c | |
parent | fa2c2dcf80cc3510aab0e0b8f6ed9fb6c020687a (diff) |
Add many new features to powder_plot
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c index 5c1db570..e201c454 100644 --- a/src/detector.c +++ b/src/detector.c @@ -919,6 +919,29 @@ double largest_q(struct image *image) return qmax; } +double smallest_q(struct image *image) +{ + int fs, ss; + double ttm = +INFINITY; + double qmin = +INFINITY; + 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 ) { + qmin = modulus(q.u, q.v, q.w); + ttm = tt; + } + + } + } + + return qmin; +} void get_pixel_extents(struct detector *det, double *min_x, double *min_y, |