labstreaminglayer / App-LabRecorder

An application for streaming one or more LSL streams to disk in XDF file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pupil Capture data null from LabRecorder xdf file

LMBooth opened this issue · comments

Hi all,

I'm unsure if my problem is more a PupilLabs issue, xdf file format issue, or LabRecorder issue but i'll ask here anyway.

I'm currently reading in EEG data, Unity markers and Pupil-Capture data via the LSL in to the LabRecorder (Built from the latest GitHub repository), exporting the created xdf file to MatLab shows the data to look correct with markers and EEG data streaming as expected, the Pupil-Capture data however is all zero with with only one time stamp and one time_series value of zero. I don't suppose anyone has had any similar issues and could share their experience in resolving such problems?

I am currently using the Vive PupilLabs add on to record my gaze data, for clarification i'm not doing anything with the HMD-Eyes package and i've installed pylsl and the pupil lsl relay to the plugins folder of Pupil-Capture, the stream can be seen in LabRecorder just the GazeMetaData on review looks incorrect in MatLab.

Any help or comments would be greatly appreciated.

Our lab has a Vive with the pupil insert and I'm pretty familiar with this software and have used it in the past. I'm fairly certain this is not a LabRecorder problem. It's possible Pupil Labs have updated their pupil-capture application without updating the LSL plugin. I don't think anyone in our lab has recorded with it since March.

We should probably move this issue, but first, can you please attach a small xdf file that has all your streams including the problematic pupil stream?

(Aside: I can also recommend the Pico Neo 2 Eye, if that would work with your setup. Feel free to ask me more here or in Slack if you're interested.)

Hi @cboulay, please find a link to my example xdf file here, just as a note the EEG data is just a test signal (square wave) for 32 channels with a upward counting ramp on the first channel. Hopefully this can provide some information to resolve my issue.

It may be useful for me to try reverting to a previous version of pupil capture and a previous version of the pupil LSL plugin, could you recommend me the version you were using to have a stable connection?

Sorry I haven't had a chance to look at the xdf file yet. I hope to tomorrow morning (which is when I typically do most of my LSL support).

I don't recommend rolling back to older versions of pupil capture. Pupil has changed their gaze calculation quite a bit since then, making it more intuitive and reliable. And their offline analysis tools, which are continually improving, don't work well with data captured with older versions. The better solution is to ask them to check that their LSL plugin works. The Pupil-Labs team is quite responsive and I would be surprised if it took them more than 2 days to get around to fixing it.

Well i certainly can confirm that the xdffile only has a single sample of the pupilcapture data. Sadly, while we have the pupil core in the lab, we also haven't recorded in months. It did work fine, though.

App-pupilabs mentions in their release notes:

`^1 Caveat: The time synchronization will potentially break if other time alternating actors (e.g. the Time Sync plugin or hmd-eyes) are active. In these cases, it is recommend that the actors follow Capture's clock instead of changing its timebase.

Could this explain your bug?

Sorry I haven't had a chance to look at the xdf file yet. I hope to tomorrow morning (which is when I typically do most of my LSL support).

I don't recommend rolling back to older versions of pupil capture. Pupil has changed their gaze calculation quite a bit since then, making it more intuitive and reliable. And their offline analysis tools, which are continually improving, don't work well with data captured with older versions. The better solution is to ask them to check that their LSL plugin works. The Pupil-Labs team is quite responsive and I would be surprised if it took them more than 2 days to get around to fixing it.

I have posted in the pupil labs discord too and am currently waiting for a response (we're at the two day mark now so fingers crossed), hopefully they can point me in the right direction. The fact my EEG and Unity data has recorded as expected as well would point to it being a PupilLabs issue.

Well i certainly can confirm that the xdffile only has a single sample of the pupilcapture data. Sadly, while we have the pupil core in the lab, we also haven't recorded in months. It did work fine, though.

App-pupilabs mentions in their release notes:

`^1 Caveat: The time synchronization will potentially break if other time alternating actors (e.g. the Time Sync plugin or hmd-eyes) are active. In these cases, it is recommend that the actors follow Capture's clock instead of changing its timebase.

Could this explain your bug?

I did see this caveat! I made sure not to use either of the TimeSync plugin or hmd-eyes unity setup, however the default plugins (the plugins capture had already ticked) i have left on, i'll try some other tests later today with even less plugins running to see if it makes a difference.

It you want to narrow the source of error a little bit more, you can try to pull and print the data from the pupillaps streams in realtime, e.g. by adapting one of the pylsl examples instead of using LabRecorder.

That's a good idea, i'll give that a go too.

I tried turning off all plugins in pupil capture apart from the lsl plugin which yielded the same result as before.

Utilising the pylsl examples by reading in the data using the ReceiveAndPlot.py example i got the following message in my command prompt (I added a print statement which would explain the <pylsl.pylsl.StreamInfo object at 0x0000019FA8FBB358>):

C:\Users\Liam\Documents\python>ReceiveAndPlot.py
looking for streams
<pylsl.pylsl.StreamInfo object at 0x0000019FA8FBB358>
Don't know what to do with stream pupil_capture

I then tried the pupil-helpers example for an lsl_inlet which also isn't receiving any data but can see the pupil-capture stream.

C:\Users\Liam\Documents\python>lsl_inlet.py
INFO:main:Looking for Pupil Capture streams...
INFO:main:Connecting to Liam-PC
INFO:main:Recording at lsl-recording.csv
DEBUG:main:0 samples written
DEBUG:main:0 samples written
DEBUG:main:0 samples written
DEBUG:main:0 samples written
DEBUG:main:0 samples written

I've been given some pointers from the pupil labs discord in my setup procedure for obtaining the gaze data after calibration, i'll give it a try at some point over the weekend and that should sort it out, i'll close the issue here now as i believe it's a pupil-labs issue, or more accurately i'm having an issue with setting up Pupil-Labs . Thanks for your comments though @cboulay and @agricolab.