Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Remove prints and fix MEArec get_traces
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Dec 8, 2020
1 parent 2d00235 commit 2946f9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def get_traces(self, channel_ids=None, start_frame=None, end_frame=None):
sorted_channel_ids = np.sort(channel_ids)
sorted_idx = np.array([list(sorted_channel_ids).index(ch) for ch in channel_ids])
recordings = self._recordings[start_frame:end_frame, sorted_channel_ids]
return np.array(recordings[sorted_idx]).transpose()
return np.array(recordings[:, sorted_idx]).T
else:
if sorted(channel_ids) == channel_ids and np.all(np.diff(channel_ids) == 1):
channel_ids = slice(channel_ids[0], channel_ids[0] + len(channel_ids))
return np.array(self._recordings[start_frame:end_frame, channel_ids]).transpose()
return np.array(self._recordings[start_frame:end_frame, channel_ids]).T

@staticmethod
def write_recording(recording, save_path, check_suffix=True):
Expand Down
1 change: 0 additions & 1 deletion spikeextractors/extractors/nwbextractors/nwbextractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ def get_traces(self, channel_ids=None, start_frame=None, end_frame=None):
# to be indexed out of order
sorted_channel_ids = np.sort(channel_ids)
sorted_idx = np.array([list(sorted_channel_ids).index(ch) for ch in channel_ids])
print(sorted_idx)
recordings = es.data[start_frame:end_frame, sorted_channel_ids].T
traces = recordings[sorted_idx, :]
else:
Expand Down

0 comments on commit 2946f9b

Please sign in to comment.