From ed0bcf1cc4be9af77eb993f1406dc991c10345d3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 6 Mar 2012 17:34:58 +0100 Subject: Add "err" to get_tt() --- libcrystfel/src/detector.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libcrystfel/src/detector.c') 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 */ -- cgit v1.2.3