Commit e1878ab7 authored by Thomas Vincent's avatar Thomas Vincent

make sure maxipix module edge is in ROI before applying correction

parent 3ca38054
......@@ -1375,13 +1375,13 @@ def _to_qspace(th_idx,
# Apply correction taking image ROI offset into account
# Skip correction if row/column with signal is outside ROI
row, column = image_roi_offset
if row < 255:
if row <= 255 < row + img_size[0]:
img[255-row:258-row] = img[255-row] / 3
if row <= 260:
if row <= 260 < row + img_size[0]:
img[max(0, 258-row):261-row] = img[260-row] / 3
if column < 255:
if column <= 255 < column + img_size[1]:
img[:, 255-column:258-column] = (img[:, 255-column] / 3)[:, None]
if column <= 260:
if column <= 260 < column + img_size[1]:
img[:, max(0, 258-column):261-column] = (img[:, 260-column] / 3)[:, None]
# Apply normalization
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment