Skip to content

Commit a3f0b8f

Browse files
committed
get channels from channels positions like probeinterface
1 parent b461764 commit a3f0b8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neo/rawio/mearecrawio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _source_name(self):
5858
return self.filename
5959

6060
def _parse_header(self):
61-
load = []
61+
load = ["channel_positions"]
6262
if self.load_recordings:
6363
load.append("recordings")
6464
if self.load_spiketrains:
@@ -71,6 +71,7 @@ def _parse_header(self):
7171
load_waveforms=False)
7272

7373
self.info_dict = deepcopy(self._recgen.info)
74+
self.channel_positions = self._recgen.channel_positions
7475
if self.load_recordings:
7576
self._recordings = self._recgen.recordings
7677
if self.load_spiketrains:
@@ -79,7 +80,7 @@ def _parse_header(self):
7980
self._sampling_rate = self.info_dict['recordings']['fs']
8081
self.duration_seconds = self.info_dict["recordings"]["duration"]
8182
self._num_frames = int(self._sampling_rate * self.duration_seconds)
82-
self._num_channels = np.sum(self.info_dict["electrodes"]["dim"])
83+
self._num_channels = self.channel_positions.shape[0]
8384
self._dtype = self.info_dict["recordings"]["dtype"]
8485

8586
signals = [('Signals', '0')]

0 commit comments

Comments
 (0)