BlackrockNeurotech / NPMK

Neural Processing Matlab Kit is a set of functions for loading and manipulating data from Blackrock Microsystems' data files (.CCF, .NEV, .NSx).
45 stars 57 forks source link

Reading non-contiguous channels in openNSx no longer works #61

Closed sbrincat closed 8 months ago

sbrincat commented 8 months ago

openNSx used to return only the channels that were requested via the channels argument, even if they were a non-contiguous sequence. Now it returns the entire block of channels from min(channels) : max(channels).

I think it is related to this (line 1117-1119):

%% Remove extra channels that were read, but weren't supposed to be read
% Commenting this section out since I think that previous code should
% capture this - DK 20230303

Example: nsx = openNSx(datafile, 'read', 'channels',1:2:8);

Previous behavior: <returned data from 1st, 3rd, 5th, and 7th channels in nsx> New behavior: <returns data from all channels from 1st through 8th channel in nsx>

Bug discovered by our user @jeffersonroy

cboulay commented 8 months ago

Please try out the PR in #62 to see if it fixes your issue.

dkluger commented 8 months ago

@sbrincat we only changed openNSx in the PR @cboulay mentioned. If you don't feel like recloning the repo and just want to try our fixes to openNSx.m, you can find that file here: https://github.com/BlackrockNeurotech/NPMK/blob/development/NPMK/openNSx.m

Please let us know if that change addressed your issues. We'll merge development to the main branch if you confirm this issue and #60 were properly addressed

sskellis commented 8 months ago

Hi @sbrincat, thank you for all of the feedback. Can you take a look at the most recent commit in #62?

sbrincat commented 8 months ago

Spencer -- #62 works well for us, our issues are solved. Thanks for the fix.

On Mon, Feb 5, 2024 at 2:49 PM Spencer Kellis @.***> wrote:

Hi @sbrincat https://github.com/sbrincat, thank you for all of the feedback. Can you take a look at the most recent commit in #62 https://github.com/BlackrockNeurotech/NPMK/pull/62?

— Reply to this email directly, view it on GitHub https://github.com/BlackrockNeurotech/NPMK/issues/61#issuecomment-1927956837, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMUGZPF4YQMK7EFAB5E623YSEZVTAVCNFSM6AAAAABCQFUSJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRXHE2TMOBTG4 . You are receiving this because you were mentioned.Message ID: @.***>

sskellis commented 8 months ago

Excellent, glad to hear that. Don't hesitate to reach back out if any other issues crop up.