added TODO note regarding ROI index order
This commit is contained in:
@@ -25,6 +25,7 @@ def calc_roi(results, data):
|
|||||||
roi_intensities_proj_x = []
|
roi_intensities_proj_x = []
|
||||||
|
|
||||||
for ix1, ix2, iy1, iy2 in zip(roi_x1, roi_x2, roi_y1, roi_y2):
|
for ix1, ix2, iy1, iy2 in zip(roi_x1, roi_x2, roi_y1, roi_y2):
|
||||||
|
#TODO: if start > stop, numpy returns an empty array, which is not obvious -- better to ensure the order start < stop by switching them if needed
|
||||||
data_roi = data[iy1:iy2, ix1:ix2]
|
data_roi = data[iy1:iy2, ix1:ix2]
|
||||||
|
|
||||||
roi_sum = np.nansum(data_roi, dtype=float) # data_roi is np.float32, which cannot be json serialized
|
roi_sum = np.nansum(data_roi, dtype=float) # data_roi is np.float32, which cannot be json serialized
|
||||||
|
|||||||
Reference in New Issue
Block a user