Skip to content

Commit

Permalink
- check for max number of channels
Browse files Browse the repository at this point in the history
- check if there are 'bad' channels
  • Loading branch information
luiztauffer committed Apr 30, 2020
1 parent 987e91a commit 6cb430b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ecogvis/functions/subFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,16 @@ def __init__(self, par):

# Channels to show
self.firstCh = int(self.parent.qline1.text())
self.lastCh = int(self.parent.qline0.text())
self.lastCh = min(self.nChTotal, int(self.parent.qline0.text()))
self.parent.qline0.setText(str(self.lastCh))
self.nChToShow = self.lastCh - self.firstCh + 1
self.selectedChannels = np.arange(self.firstCh - 1, self.lastCh)

self.current_rect = []
self.badChannels = np.where(self.nwb.electrodes['bad'][:])[0].tolist()
if 'bad' in self.nwb.electrodes:
self.badChannels = np.where(self.nwb.electrodes['bad'][:])[0].tolist()
else:
self.badChannels = []

# Load invalid intervals from NWB file
self.allIntervals = []
Expand Down

0 comments on commit 6cb430b

Please sign in to comment.