aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-03-06 17:34:58 +0100
committerThomas White <taw@physics.org>2012-03-06 17:34:58 +0100
commited0bcf1cc4be9af77eb993f1406dc991c10345d3 (patch)
treeea9a378b7f6d51a3e609eb07b0cb5da92658f590 /libcrystfel/src/detector.c
parenta4ab18ed5fb5be7e9331215fcf6381a8edb6abf7 (diff)
Add "err" to get_tt()
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r--libcrystfel/src/detector.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index bbb65c9a..ee09eb73 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -277,13 +277,19 @@ int in_bad_region(struct detector *det, double fs, double ss)
}
-double get_tt(struct image *image, double fs, double ss)
+double get_tt(struct image *image, double fs, double ss, int *err)
{
double r, rx, ry;
struct panel *p;
double xs, ys;
+ *err = 0;
+
p = find_panel(image->det, fs, ss);
+ if ( p == NULL ) {
+ *err = 1;
+ return 0.0;
+ }
/* Convert xs and ys, which are in fast scan/slow scan coordinates,
* to x and y */