From 3d85005cacbc800e4cac89d01534da3d943b1874 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 30 Jul 2020 14:16:25 +0200 Subject: Add show_panel() to API --- libcrystfel/src/detgeom.c | 21 +++++++++++++++++++++ libcrystfel/src/detgeom.h | 2 ++ libcrystfel/src/image.c | 21 --------------------- 3 files changed, 23 insertions(+), 21 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/detgeom.c b/libcrystfel/src/detgeom.c index 392b9b69..05a618bc 100644 --- a/libcrystfel/src/detgeom.c +++ b/libcrystfel/src/detgeom.c @@ -120,3 +120,24 @@ double detgeom_max_resolution(struct detgeom *detgeom, return max_res; } + + +void show_panel(struct detgeom_panel *p) +{ + STATUS("Panel '%s':\n", p->name); + STATUS(" Size %i x %i px\n", p->w, p->h); + STATUS(" Transformation [cnx] + [%6.2f %6.2f] [fs] = [x]\n", + p->fsx, p->ssx); + STATUS(" [cny] + [%6.2f %6.2f] [ss] = [y]\n", + p->fsy, p->ssy); + STATUS(" [cnz] + [%6.2f %6.2f] = [z]\n", + p->fsz, p->ssz); + STATUS(" corner x,y,z = %f, %f, %f px\n", + p->cnx, p->cny, p->cnz); + STATUS(" = %f, %f, %f mm\n", + p->cnx*p->pixel_pitch*1e3, + p->cny*p->pixel_pitch*1e3, + p->cnz*p->pixel_pitch*1e3); + STATUS(" %f adu/photon, max %f adu\n", + p->adu_per_photon, p->max_adu); +} diff --git a/libcrystfel/src/detgeom.h b/libcrystfel/src/detgeom.h index 99355a38..c2e07e93 100644 --- a/libcrystfel/src/detgeom.h +++ b/libcrystfel/src/detgeom.h @@ -102,6 +102,8 @@ extern void detgeom_free(struct detgeom *detgeom); extern double detgeom_max_resolution(struct detgeom *detgeom, double wavelength); +extern void show_panel(struct detgeom_panel *p); + #ifdef __cplusplus } #endif diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 64a46018..cf7f1331 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -397,27 +397,6 @@ static double convert_to_m(double val, int units) } -static UNUSED void show_panel(struct detgeom_panel *p) -{ - STATUS("Panel '%s':\n", p->name); - STATUS(" Size %i x %i px\n", p->w, p->h); - STATUS(" Transformation [cnx] + [%6.2f %6.2f] [fs] = [x]\n", - p->fsx, p->ssx); - STATUS(" [cny] + [%6.2f %6.2f] [ss] = [y]\n", - p->fsy, p->ssy); - STATUS(" [cnz] + [%6.2f %6.2f] = [z]\n", - p->fsz, p->ssz); - STATUS(" corner x,y,z = %f, %f, %f px\n", - p->cnx, p->cny, p->cnz); - STATUS(" = %f, %f, %f mm\n", - p->cnx*p->pixel_pitch*1e3, - p->cny*p->pixel_pitch*1e3, - p->cnz*p->pixel_pitch*1e3); - STATUS(" %f adu/photon, max %f adu\n", - p->adu_per_photon, p->max_adu); -} - - void create_detgeom(struct image *image, const DataTemplate *dtempl) { struct detgeom *detgeom; -- cgit v1.2.3