diff --git a/main.py b/main.py index 0326b51e43859c9b60487159297e6e4e11193af6..cf0871a488dd1eeea1337198f5ad80bc5518a919 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,7 @@ import influxdb import settings from tools import Memory, MovingAverage, to_redis, ion_positions, dark_ions, ion_linearity from tools import detect_ion_cloud, read_factor, compensate_gradient -from tools import TrapState, max_ion_intensity, detect_wrong_isotopes, load_image, ion_roundness +from tools import TrapState, max_ion_intensity, detect_dim_ions, load_image, ion_roundness conn = redis.Redis('localhost', decode_responses=True) @@ -51,7 +51,7 @@ while True: roundness = ion_roundness(image, coord[0][:2]) new_img = compensate_gradient(image, coord) max_int, num_pix = max_ion_intensity(new_img, coord) - coord = detect_wrong_isotopes(new_img, coord, max_int) + coord = detect_dim_ions(new_img, coord, max_int) LINEARITY = ion_linearity(coord) if len(coord) > 1 and dist_factor is not None: coord = dark_ions(image, coord) diff --git a/tools.py b/tools.py index bd87614962ee730736b61ffdca568ce1366ded18..9d7944817567f5f4de7a7ce15a574f362b2aec4c 100644 --- a/tools.py +++ b/tools.py @@ -309,7 +309,7 @@ def max_ion_intensity(image, centers): return max_intensity, num_pixels -def detect_wrong_isotopes(image, centers, max_intensity): +def detect_dim_ions(image, centers, max_intensity): """ Measure intensity for each ion. If the intensity is below INT_THS, we mark it as a wrong isotope.