renamed variable pfdata to data

This commit is contained in:
2024-07-30 18:57:40 +02:00
parent 3c52784d48
commit 8a72928a20

View File

@ -1,7 +1,7 @@
import numpy as np
def calc_roi(results, pfdata, roi_x1, roi_x2, roi_y1, roi_y2, pixel_mask_pf, threshold_value_choice):
def calc_roi(results, data, roi_x1, roi_x2, roi_y1, roi_y2, pixel_mask_pf, threshold_value_choice):
if pixel_mask_pf is None:
return
@ -12,7 +12,7 @@ def calc_roi(results, pfdata, roi_x1, roi_x2, roi_y1, roi_y2, pixel_mask_pf, thr
results["roi_intensities_proj_x"] = []
for iRoi in range(len(roi_x1)):
data_roi = np.copy(pfdata[roi_y1[iRoi]:roi_y2[iRoi], roi_x1[iRoi]:roi_x2[iRoi]])
data_roi = np.copy(data[roi_y1[iRoi]:roi_y2[iRoi], roi_x1[iRoi]:roi_x2[iRoi]])
roi_results[iRoi] = np.nansum(data_roi)
if threshold_value_choice == "NaN":