From 679b25d13ffd6c43d4f1440cee05772834429863 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 27 May 2015 17:38:48 +0200 Subject: Add detector_has_clen_references() --- libcrystfel/src/detector.c | 12 ++++++++++++ libcrystfel/src/detector.h | 2 ++ 2 files changed, 14 insertions(+) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index d1614d6e..7979315b 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -400,6 +400,18 @@ double get_tt(struct image *image, double fs, double ss, int *err) } +int detector_has_clen_references(struct detector *det) +{ + int i; + + for ( i=0; in_panels; i++ ) { + if ( det->panels[i].clen_from != NULL ) return 1; + } + + return 0; +} + + void record_image(struct image *image, int do_poisson, double background, gsl_rng *rng, double beam_radius, double nphotons) { diff --git a/libcrystfel/src/detector.h b/libcrystfel/src/detector.h index a5a7b98a..acb6609f 100644 --- a/libcrystfel/src/detector.h +++ b/libcrystfel/src/detector.h @@ -255,6 +255,8 @@ extern int single_panel_data_source (struct detector *det, const char *element); struct rg_collection *find_rigid_group_collection_by_name(struct detector *det, const char *name); +extern int detector_has_clen_references(struct detector *det); + #ifdef __cplusplus } #endif -- cgit v1.2.3