From abc3503e7a98dd285e14791ddd53947ffbbc00f6 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Thu, 29 Apr 2021 14:41:08 +0200 Subject: [PATCH] using a fixed crop border for spots --- sensospot_grid/parameters.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sensospot_grid/parameters.py b/sensospot_grid/parameters.py index a1cdfc0..9ebd0ba 100644 --- a/sensospot_grid/parameters.py +++ b/sensospot_grid/parameters.py @@ -59,10 +59,13 @@ def spot_parameters_from_xml(tree, array_parameters): rx = array_parameters.dist_x ry = array_parameters.dist_y - # ROI is strangely named in params file, it's actually the outside crop - reg = tree.find("Registration").find("Settings") - cx = _to_micro_meters(reg.attrib["ROIMarginWidth"]) - cy = _to_micro_meters(reg.attrib["ROIMarginHeight"]) + # before, the ROIMarginWidth and ROIMarginHeight settings from the array + # analysis was used. But this seems to be more or less independend of the + # spot offset. Therfore we crop 100µm more than the spot offset. + # for future reference, how to access the node: + # reg = tree.find("Registration").find("Settings") + cx = rx + 100 + cy = ry + 100 return SpotParameters(rs, rb, rx, ry, cx, cy)