Skip to content

Commit

Permalink
Merge pull request #1212 from AllenNeuralDynamics/fix-818-id-name
Browse files Browse the repository at this point in the history
Fix 818 id name
  • Loading branch information
micahwoodard authored Dec 17, 2024
2 parents 961848c + 398cc81 commit 140b085
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/foraging_gui/Foraging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2959,8 +2959,6 @@ def _Open_getListOfMice(self):
now = datetime.now()
mouse_dirs = os.listdir(filepath)
mouse_dirs.sort(reverse=True, key=lambda x: os.path.getmtime(os.path.join(filepath, x))) # in order of date modified
dates = [datetime.fromtimestamp(os.path.getmtime(os.path.join(filepath, path))) for path in mouse_dirs]
two_week = [mouse_dir for mouse_dir, mod_date in zip(mouse_dirs, dates) if (now-mod_date).days <= 14]
mice = []
experimenters = []
for m in mouse_dirs:
Expand All @@ -2976,6 +2974,8 @@ def _Open_getListOfMice(self):
mice.append(m)
experimenters.append(name)
break
dates = [datetime.fromtimestamp(os.path.getmtime(os.path.join(filepath, path))) for path in mouse_dirs]
two_week = [mouse_dir for mouse_dir, mod_date in zip(mice, dates) if (now - mod_date).days <= 14]
return mice, experimenters, two_week

def _Open(self,open_last = False,input_file = ''):
Expand All @@ -2987,7 +2987,7 @@ def _Open(self,open_last = False,input_file = ''):
# list of mice, experimenters, and two week in chronological order form date modified
mice, experimenters, two_week = self._Open_getListOfMice()
# only add mice from two weeks in drop down.
W = MouseSelectorDialog(self, [m + ' ' + n for m, n in zip(two_week, experimenters)])
W = MouseSelectorDialog(self, [m + ' ' + experimenters[mice.index(m)] for m in two_week])

ok, info = (
W.exec_() == QtWidgets.QDialog.Accepted,
Expand Down
2 changes: 2 additions & 0 deletions src/foraging_gui/bias_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ def clear(self):
# reset bias list
self._biases = []
# reset upper and lower ci
self._upper_scatter_item = PlotDataItem([0], [0], pen='lightgray')
self._lower_scatter_item = PlotDataItem([0], [0], pen='lightgray')
self.bias_plot.addItem(self._upper_scatter_item)
self.bias_plot.addItem(self._lower_scatter_item)
self.bias_plot.addItem(FillBetweenItem(curve1=self._upper_scatter_item,
Expand Down

0 comments on commit 140b085

Please sign in to comment.