BlackrockNeurotech/NPMK

Bug in number of samples?

ftadel opened this issue · 4 comments

A user of the Brainstorm software reported an error related with the reading of this file:
https://drive.google.com/file/d/1emCpRUogef9nI3-o2jSQCHI_EQh2gtJW/view?usp=sharing

The error is initially documented here:
https://neuroimage.usc.edu/forums/t/error-in-convert-raw-to-lfp/31468/8

Here is how to reproduce the behavior I don't understand (Win10):

DataFile = 'C:\...\G38-1.ns6';
rec = openNSx(DataFile, 'noread', 'nozeropad');
nSamples = rec.MetaTags.DataPoints;    % 70943612

rec = openNSx('read', DataFile , 'channels', 1, 'sample', 't:1:70943612', 'p:short', 'uV');
nSamplesRead = size(rec.Data,2);  % 70943714

Why does the second call to openNSx return 70943714 samples instead of 70943612?

PS: the version of the library used in this example is the last stable release:
https://github.com/BlackrockMicrosystems/NPMK/archive/refs/tags/5.5.2.0.zip

Hi, Thanks for reporting this. I'll check it out later this week.

Best, Kian

Hi Francois,

I tried to access the data file, but got an error message:
Screen Shot 2021-12-03 at 12 44 47 PM

Could you please ask the user to upload the problematic data file again? I'm OK with the 5 GB file.

Thanks,
Kian

I'm sorry, our user have deleted the file before you could download it.
On the Brainstorm forum, I asked to make it available. I'll let you know when the file can be downloaded again.