Skip to content

Bug in number of samples? #37

@ftadel

Description

@ftadel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions