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

The order of the streams in XDF file seems to be random #49

Open
Yida-Lin opened this issue Mar 9, 2017 · 4 comments
Open

The order of the streams in XDF file seems to be random #49

Yida-Lin opened this issue Mar 9, 2017 · 4 comments

Comments

@Yida-Lin
Copy link
Contributor

Yida-Lin commented Mar 9, 2017

I know this is not a SigViewer problem but I thought it's easier to discuss it here.

Also currently the way libxdf loads the streams don't follow the exact stream number (well, when I was writing libxdf I basically modeled libxdf on the load_xdf function in MatLab, and that's the approach in the MatLab code).

@cbrnr
Copy link
Owner

cbrnr commented Mar 9, 2017

Is there a natural order of the streams? If so, it would be nice if libxdf returned the streams in that order.

@Yida-Lin
Copy link
Contributor Author

Yida-Lin commented Mar 9, 2017

It's rather complicated. First of all, labrecorder generated the streams order totally randomly: every time it records the same content, it will put the streams in different order

image

Then, each stream technically still has a stream ID. They are not in order, so you will see something like [4,7,2,6,1,8].

However, in the MatLab load_xdf, the way it assigns each stream number is depending on their position in the XDF file, rather than their stream ID.

        streamid = fread(f,1,'uint32');

        id = length(streams)+1;

        idmap(streamid) = id; 

@cbrnr
Copy link
Owner

cbrnr commented Mar 9, 2017

Hm. So the order libxdf loads and stores the streams is not really random but actually follows the order in which the streams are stored in the XDF file. That's fine with me, but if we have time to spare later on it would certainly be nice to order the streams with respect to their IDs.

@cbrnr
Copy link
Owner

cbrnr commented Apr 25, 2017

@Yida-Lin this is a libxdf issue right? If so, let's close this here and create a new issue in the libxdf repo. I think retaining the original stream IDs would be nice.

@cbrnr cbrnr changed the title The order of the streams in XDF file seems to be random. Should we fix it? The order of the streams in XDF file seems to be random Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants