Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug in maxwellrawio.py that shuffled channels #1310

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions neo/rawio/maxwellrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
if np.array(channel_indexes).size > 1 and np.any(np.diff(channel_indexes) < 0):
# get around h5py constraint that it does not allow datasets
# to be indexed out of order
sorted_channel_indexes = np.sort(channel_indexes)
resorted_indexes = np.array(
[list(channel_indexes).index(ch) for ch in sorted_channel_indexes])
order_f = np.argsort(channel_indexes)
sorted_channel_indexes = channel_indexes[order_f]
# use argsort again on order_f to obtain resorted_indexes
resorted_indexes = np.argsort(order_f)

try:
if resorted_indexes is None:
Expand Down