aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-01-14 17:30:29 +0100
committerThomas White <taw@physics.org>2021-01-14 17:30:29 +0100
commite5575e55c7a6231f9555b188d19eb6f57af92518 (patch)
treebb173164b9d3e1cf733dcb2243644e39b05b258d /libcrystfel
parent0fff357a2b422b3fbeacfa0e9522bbff5e09aef6 (diff)
Correct bad region coordinates
Bad regions are specified (in the geometry file) in terms of the "file" coordinates, which might be different to the panel-relative ones.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/datatemplate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index d2257f9e..ec9f8751 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -1282,6 +1282,13 @@ DataTemplate *data_template_new_from_string(const char *string_in)
dt->bad[i].panel_name,
dt->bad[i].name);
reject = 1;
+ } else {
+ struct panel_template *p;
+ p = &dt->panels[dt->bad[i].panel_number];
+ dt->bad[i].min_fs -= p->orig_min_fs;
+ dt->bad[i].max_fs -= p->orig_min_fs;
+ dt->bad[i].min_ss -= p->orig_min_ss;
+ dt->bad[i].max_ss -= p->orig_min_ss;
}
}
}