diff options
author | Thomas White <taw@physics.org> | 2015-05-27 17:38:48 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-05-27 17:38:48 +0200 |
commit | 679b25d13ffd6c43d4f1440cee05772834429863 (patch) | |
tree | 8e7a94a36f459c21251e032e051d39d25a8919fd /libcrystfel | |
parent | 80d0c1064bb7a00fae458211ab9429cb6c1ed4cc (diff) |
Add detector_has_clen_references()
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/detector.c | 12 | ||||
-rw-r--r-- | libcrystfel/src/detector.h | 2 |
2 files changed, 14 insertions, 0 deletions
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; i<det->n_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 |