small bug in sum_images fixed
This commit is contained in:
@@ -70,8 +70,8 @@ def sum_images(fileset, channel="JF16T03V01", alignment_channels=None, batch_siz
|
||||
else:
|
||||
im_ROI = im[:, roi.rows, roi.cols]
|
||||
|
||||
res[f"{channel}_intensity"].append(np.sum(im_ROI, axis=(1, 2)))
|
||||
res["pids"].append(Images.pids[index_slice])
|
||||
res[f"{channel}_intensity"].extend(np.sum(im_ROI, axis=(1, 2)))
|
||||
res["pids"].extend(Images.pids[index_slice])
|
||||
|
||||
# only return first batch
|
||||
if preview:
|
||||
|
||||
@@ -107,6 +107,14 @@ class ROI:
|
||||
|
||||
def __repr__(self):
|
||||
return f"ROI(bottom={self.bottom}, top={self.top}, left={self.left}, right={self.right})"
|
||||
|
||||
def __eq__(self, other):
|
||||
# we disregard the name
|
||||
return (self.left, self.right, self.bottom, self.top) == (other.left, other.right, other.bottom, other.top)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
|
||||
######################## Setting up paths ########################
|
||||
|
||||
@@ -236,4 +244,4 @@ def sigma_to_FWHM(sigma):
|
||||
def FWHM_to_sigma(FWHM):
|
||||
"""FWHM to gaussian sigma"""
|
||||
sigma = FWHM / 2.355
|
||||
return sigma
|
||||
return sigma
|
||||
|
||||
Reference in New Issue
Block a user