labstreaminglayer / App-LabRecorder

An application for streaming one or more LSL streams to disk in XDF file format.
MIT License
123 stars 45 forks source link

File too large for xdf load #82

Closed MaJoRkranz closed 2 years ago

MaJoRkranz commented 2 years ago

Hi, I simultaneously recorded EEG and audio using the LabRecorder and synchronized the streams in LSL. When loading the audio streams using pop_loadxdf (version: 1.18) I receive the following message: 'Warning: Rank deficient, rank = 1, tol = 4.574081e+03'. The error is caused in line 600 in load_xdf when the jitter is removed: 'mapping = temp(k).time_stamps(indices) / [ones(1,length(indices)); indices];' As a result, trigger markers, which I use to epoch the EEG and audio streams, are not correct in the audio stream. The error occurs only if an audiostream has a length of approximately more than 62.000.000 data points. I recorded with a sampling rate of 44100, thus I have roughly 23 min of data.

Here an example how to reproduce the error in MATLAB 2020b:

% this throws an error in matlab 2020b % Warning: Rank deficient, rank = 1, tol = 4.366797e+03. nrSamples =65000000; time_stamps=linspace(0,26,nrSamples); indices=1:length(time_stamps); mapping = time_stamps(indices) / [ones(1,length(indices)); indices];

%this does not, only differenc is nrSamples nrSamples =60000000; time_stamps=linspace(0,26,nrSamples); indices=1:length(time_stamps); mapping = time_stamps(indices) / [ones(1,length(indices)); indices];

I appreciate any help!

As this is rather an xdf_load issue I posted it already here: https://github.com/xdf-modules/xdf-Matlab/issues/12#issue-1231093882 So far no one answered, so I wanted to give it a try here :)

dmedine commented 2 years ago

Since this is indeed not an issue with LabRecorder I am going to close this and move the discussion to the xdf-Matlab issue.