fixed a bug where average3 would not load when groups were not continous
@@ -645,9 +645,12 @@ class Window(QtGui.QMainWindow):
self.median_lp = np.mean([np.median(locs.lpx), np.median(locs.lpy)])
if hasattr(locs, 'group'):
groups = np.unique(locs.group)
+ groupcopy = locs.group.copy()
+ for i in range(len(groups)):
+ groupcopy[locs.group==groups[i]]=i
np.random.shuffle(groups)
groups %= N_GROUP_COLORS
- self.group_color = groups[locs.group]
+ self.group_color = groups[groupcopy]
if render:
self.fit_in_view(autoscale=True)
else:
