tssearch/utils/visualization.py, function plot_search_distance_result() doesn't map colors correctly. In particular the minimum and maximum distance colors are incorrectly assigned to out of range values, making the plot misleading.
Line 114 in Scaling of distance for color lookup is incorrect:
d_idx = int((d - min_dist) * cmap.N / delta_dist) - 1 # INCORRECT
correct code shown below.
d_idx = int((d - min_dist) * (cmap.N -1) / delta_dist)
Sample values with incorrect and corrected scaling
tsssearch_plot_bug.txt
tssearch/utils/visualization.py, function plot_search_distance_result() doesn't map colors correctly. In particular the minimum and maximum distance colors are incorrectly assigned to out of range values, making the plot misleading.
Line 114 in Scaling of distance for color lookup is incorrect:
d_idx = int((d - min_dist) * cmap.N / delta_dist) - 1 # INCORRECTcorrect code shown below.
d_idx = int((d - min_dist) * (cmap.N -1) / delta_dist)Sample values with incorrect and corrected scaling
tsssearch_plot_bug.txt