diff options
author | Thomas White <taw@physics.org> | 2023-05-15 17:16:21 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-07-28 13:22:04 +0200 |
commit | e6cee18a78236c5bb763c024e586c7154c82535c (patch) | |
tree | 371519b356a4b5465e87e92f2a9100db89aed756 /libcrystfel/src/detgeom.c | |
parent | 451ebfa705126e95c0186aac285f0c32bc01b83e (diff) |
Transfer detector hierarchy to detgeom
Diffstat (limited to 'libcrystfel/src/detgeom.c')
-rw-r--r-- | libcrystfel/src/detgeom.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcrystfel/src/detgeom.c b/libcrystfel/src/detgeom.c index 58e52f01..bd98aed2 100644 --- a/libcrystfel/src/detgeom.c +++ b/libcrystfel/src/detgeom.c @@ -174,3 +174,15 @@ double detgeom_mean_camera_length(struct detgeom *dg) return mean; } + + +struct detgeom_panel *detgeom_find_panel(struct detgeom *dg, const char *name) +{ + int i; + for ( i=0; i<dg->n_panels; i++ ) { + if ( strcmp(dg->panels[i].name, name) == 0 ) { + return &dg->panels[i]; + } + } + return NULL; +} |