This commit is contained in:
2024-07-30 19:57:36 +02:00
parent a4918c989c
commit 629d2c84bb

View File

@ -1,16 +1,21 @@
def calc_spi_analysis(results):
if "spi_limit" in results and len(results["spi_limit"]) == 2:
if "spi_limit" not in results:
return
number_of_spots = 0
if results["roi_intensities_normalised"][0] >= results["spi_limit"][0]:
number_of_spots += 25
if results["roi_intensities_normalised"][1] >= results["spi_limit"][1]:
number_of_spots += 50
if len(results["spi_limit"]) != 2:
return
results["number_of_spots"] = number_of_spots
if number_of_spots > 0:
results["is_hit_frame"] = True
number_of_spots = 0
if results["roi_intensities_normalised"][0] >= results["spi_limit"][0]:
number_of_spots += 25
if results["roi_intensities_normalised"][1] >= results["spi_limit"][1]:
number_of_spots += 50
results["number_of_spots"] = number_of_spots
if number_of_spots > 0:
results["is_hit_frame"] = True