diff options
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 988d3f28..a8f8b079 100644 --- a/libcrystfel/src/detgeom.c +++ b/libcrystfel/src/detgeom.c @@ -213,3 +213,15 @@ void detgeom_show_hierarchy(const struct detgeom *dg) { detgeom_show_group(dg->top_group, 0); } + + +void detgeom_translate_detector_m(struct detgeom *dg, double x, double y, double z) +{ + int i; + for ( i=0; i<dg->n_panels; i++ ) { + struct detgeom_panel *p = &dg->panels[i]; + p->cnx += x / p->pixel_pitch; + p->cny += y / p->pixel_pitch; + p->cnz += z / p->pixel_pitch; + } +} |