diff options
author | Thomas White <taw@physics.org> | 2023-05-16 11:36:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-07-28 13:22:05 +0200 |
commit | a1fd17887274262ec3e2ff5421b93c00fb74024a (patch) | |
tree | 00fe60d3361702b520a210b17f4270118de7c9b3 /src | |
parent | 3e8caf1258140119b5fbce74cc1040da7e8d280e (diff) |
adjust_detector: Implement group translation
Diffstat (limited to 'src')
-rw-r--r-- | src/adjust_detector.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/adjust_detector.c b/src/adjust_detector.c index 37fa5008..8c7e6aec 100644 --- a/src/adjust_detector.c +++ b/src/adjust_detector.c @@ -100,6 +100,7 @@ int main(int argc, char *argv[]) double z_rot = 0.0; int mm = 0; char *group = strdup("all"); + int r; /* Long options */ const struct option longopts[] = { @@ -198,5 +199,20 @@ int main(int argc, char *argv[]) data_template_show_hierarchy(dtempl); + if ( mm ) { + r = data_template_translate_group_m(dtempl, group, + x_shift * 1e-3, + y_shift * 1e-3, + z_shift * 1e-3); + } else { + r = data_template_translate_group_px(dtempl, group, + x_shift, y_shift, z_shift); + } + + if ( r ) { + ERROR("Failed to translate group.\n"); + return 1; + } + return 0; } |