software-dev


user-a09f5d 01 September, 2020, 08:39:50

@user-a09f5d There is a default depth value that is being assumed. In your case, it should always be the same z-value, correct? @papr Hi Papr. The values for gaze_normal0_z are not the same and actually vary quite a bit (easily as much as the values for x and y in some places) hence my confusion.

Chat image

user-a09f5d 01 September, 2020, 08:41:07

A second screen shot that shows quite well how much z seems to change.

Chat image

papr 01 September, 2020, 08:41:53

@user-a09f5d Thank you for providing the screenshots. I will have a look at the code to refresh my memory.

user-a09f5d 01 September, 2020, 08:42:31

Thank you @papr

user-a09f5d 01 September, 2020, 10:41:28

Hi! A different issue this time. A few days ago I made a recording in pupil capture (using a core head set) to test out and compare different methods of calibrating the set up. Immediately after making the recording I opened it in pupil player and used the post-hoc gaze calibration to create separate calibration files (each based on the different calibration methods used during recording) and then map the gaze point of each calibration so I could visually compare their accuracy. This all worked fine with no issues, however ever since I closed pupil player I experience problems every time I try to reload the recording. The recording opens as normal in player under default setting, however player crashes (without recovery) every time I try to switch to post-hoc gaze calibration meaning the recording is currently unusable. I would be extremely grateful for any advice on how to resolve this issue and/or how to stop it happening again. Happy to provide as much information as you need. Many thanks!

user-c5fb8b 01 September, 2020, 10:42:51

Hi @user-a09f5d, please share the log file with us after Player crashes. Assuming you run Pupil from bundle, you can find it your home folder > pupil_player_settings > player.log

user-c5fb8b 01 September, 2020, 10:43:08

Either post it here, or share it with data@pupil-labs.com

user-a09f5d 01 September, 2020, 10:45:39

No problem. I have attached the log.

player.log

papr 01 September, 2020, 10:59:10

@user-a09f5d Mmh, it looks like the data is somehow inconsistent. I would suggest deleting the offline_data folder and setting up the post-hoc calibrations and gaze mappers again.

user-a09f5d 01 September, 2020, 11:52:43

@user-a09f5d Mmh, it looks like the data is somehow inconsistent. I would suggest deleting the offline_data folder and setting up the post-hoc calibrations and gaze mappers again. @papr Thanks, that seems to have worked and it no longer crashes. Do you have an idea what could have caused the problem so I can take steps to avoid it happening again? It took me quite a while to set up the post-hoc calibration and gaze mappers so I'd like to avoid having the same issue again.

papr 01 September, 2020, 12:01:53

I have not come across this issue before. This must have been an issue during saving the result cache. Do you remember Player crashing after running the post-hoc mapping successfully?

user-a09f5d 01 September, 2020, 12:18:22

No, I don't recall it crashing the day I made the recording and calibrations. It only crashed today when I tried to work with the recording again. With that said however, from time to time I do experience the problem of player not opening and this can only be solved by deleting user_settings_player in pupil_player_settings (I found this solution online as someone else had reported the same issue on one of your forum pages).

papr 01 September, 2020, 12:21:24

@user-a09f5d The application window not appearing is a Windows-only issue that is related to multi-monitor setups and will be addressed in our next release.

papr 01 September, 2020, 12:22:42

Should you encounter this issue [1] again, please share a copy of the raw recording, including offline_data such that we can investigate the issue.

[1] https://discordapp.com/channels/285728493612957698/446977689690177536/750304315431845980

user-a09f5d 01 September, 2020, 13:24:38

Should you encounter this issue [1] again, please share a copy of the raw recording, including offline_data such that we can investigate the issue.

[1] https://discordapp.com/channels/285728493612957698/446977689690177536/750304315431845980 @papr I will do. Thanks for your help.

papr 02 September, 2020, 14:42:52

@user-a09f5d I looked at the monocular depth issue. My statement was not entirely correct. We assume a fixed depth, but it is used to scale the pupil normal (gaze direction in eye coordinates) before mapping it to the scene camera.

Reference: https://github.com/pupil-labs/pupil/blob/0a13e9c72151c77df1f5b4d2ea44fd6dd142d1f1/pupil_src/shared_modules/gaze_mapping/gazer_3d/gazer_headset.py#L154-L159

user-a09f5d 02 September, 2020, 18:13:19

Hi @papr Thanks for getting back to me on this. I'm afraid I don't completely follow. So what does this mean for the values of gaze_normal[0,1]_z that are exported in gaze_position.csv? Does pupil normal relate to norm_pos_[x,y] in pupil_position.csv or gaze_position.csv?

For context, the reason I am interested in gaze_normal[0,1]_[x,y,z] is because I'm trying to find the best way to calculate the angle of rotation of the eye between two different time points (e.g. if at time_point_1 the left eye is looking at target A but at time_point_2 the same eye is looking at target B; I want to calculate the angle between the gaze direction at time_point_1 and time_point_2). I am currently testing out if I can use the the x, y, z values provided by gaze_normal[0,1]_[x,y,z] to calculate this angle of rotation. Hopefully that makes sense?

papr 02 September, 2020, 18:15:08

@user-a09f5d Do you care about the targets or only about the individual eye movement?

papr 02 September, 2020, 18:15:38

In the former case, use gaze_normals, in the latter use circle_3d_normal

user-a09f5d 02 September, 2020, 18:17:32

I only care about the rotation of the eye along the x and y axis.

papr 02 September, 2020, 18:18:09

x and y axis of the eye image or the scene camera?

papr 02 September, 2020, 18:19:57

To be honest, I think using gaze normals migth make more sense, nontheless, as they have a common coordinate system

papr 02 September, 2020, 18:20:35

if you use circle_3d_normal, the vectors lie in different coordinate systems and comparing the x/y differences of both eyes will not be possible

user-99ee4f 04 September, 2020, 18:42:42

@user-c5fb8b @papr Thanks for your help earlier. With 2019.4, I'm getting the following warning:

Assets\Plugins\Pupil\Scripts\Calibration.cs(133,31): warning CS0618: 'InputTracking.GetLocalPosition(XRNode)' is obsolete: 'This API is obsolete, and should no longer be used. Please use InputDevice.TryGetFeatureValue with the CommonUsages.devicePosition usage instead.'

Should this cause any issues? I can't remember if I had this warning with the 2018 version.

user-c5fb8b 07 September, 2020, 07:25:58

@user-99ee4f Unity's InputTracking was marked obsolete in version 2019.2, so it does not cause issues in 2018. I did not find why they deprecated it, but it seems the InputTracking system did not pick up some sorts of input controllers, such as GameControllers, HardwareTrackers, ...

That being said, marking a method as obsolete normally means it still works the same way as it did before, but might be removed at some point in the future. In HMD-Eyes this is only used to read the 3D coordinates of the eyes from the XR integration. If this continues to work for you, then you should be fine.

user-5b46cf 08 September, 2020, 12:48:24

Hi,

Hope you're all well. Have a question about data extracted from gaze pldata files (recordings made in capture 1.9.7). In python, using load_pldata_file with the topic 'gaze', seems to be returning data with a frequency just over 240Hz. Trying to understand why that would be the case - i read somewhere about prioritising latency in data recordings and the timestamps we're getting appear twice (with differences on the 5th or so decimal) - Am i seeing gaze data for left and right eyes, or have i accidentally accessed the pupil data instead?

Any advice?

Thanks, Sam.

papr 08 September, 2020, 12:51:23

@user-5b46cf This is a result of how we match pupil data in realtime in order to map it go binocular and monocular gaze. We have made a detailed visualization of how the algorithm builds pairs here: https://nbviewer.jupyter.org/github/pupil-labs/pupil-matching-evaluation/blob/master/gaze_mapper_evaluation.ipynb I think the key message is that a single pupil datum can be used for two different gaze points.

user-5b46cf 08 September, 2020, 12:53:30

@papr Great thanks - just the info i was looking for - i'll have a look through the docs.

user-664974 18 September, 2020, 13:20:10

hi all, I am wondering if there is a way to batch export the pupil lab recordings (like a script) instead of opening the pupil player and manually export the data. Thanks in advance!

user-c5fb8b 18 September, 2020, 13:49:25

Hi @user-664974, Pupil Player does currently not support batch export

user-664974 18 September, 2020, 13:54:20

Thanks @user-c5fb8b I only managed to create a python script to load the pupil player recordings in a for loop and then manually export them. Only if there was a way to send a command 'e' to the pupil_player.exe 🙂 Thanks anyways!

user-ec94b9 21 September, 2020, 14:00:20

I keep getting this message "world - [ERROR] calibration_choreography.screen_marker_plugin: Calibration requiers world capture video input." and it won't let me calibrate my pupil. Can anyone help?

papr 21 September, 2020, 14:01:16

@user-ec94b9 Hey 🙂 Which software version and hardware do you use?

user-ec94b9 21 September, 2020, 14:01:56

I have the pupil core headset and the pupil capture software v2.3.0.

papr 21 September, 2020, 14:02:43

@user-ec94b9 Do you see the realtime camera preview in all three windows?

papr 21 September, 2020, 14:03:05

Or has any of the windows a grey background?

user-ec94b9 21 September, 2020, 14:03:57

I just realized I have v2.4.0. so I opened that and it's working!

papr 21 September, 2020, 14:04:59

great! My guess is the cameras were not correctly detected the first time.

user-ec94b9 21 September, 2020, 14:06:01

It now says "calibration failed - not enough pupil data"

papr 21 September, 2020, 14:06:50

@user-ec94b9 Same questions apply here: Do you see the realtime camera preview in all three windows? Or has any of the windows a grey background?

user-ec94b9 21 September, 2020, 14:07:30

I only see the realtime camera preview in one window; the other two windows have a white background.

papr 21 September, 2020, 14:08:04

@user-ec94b9 It looks like these cameras are not setup correctly. Which operating system do you use?

user-ec94b9 21 September, 2020, 14:08:23

Windows 10?

papr 21 September, 2020, 14:09:39

ok. Then it looks like the drivers are not properly installed. Please turn Capture off, make sure the headset is properly connected and start Capture again. If there is a dialogue asking for administration permissions, please grant them.

user-ec94b9 21 September, 2020, 14:11:30

Okay - thanks SO MUCH for all of your help.

user-ec94b9 21 September, 2020, 14:11:48

Should the real time video show up in all three windows?

papr 21 September, 2020, 14:12:17

Yes, each window represents one of the three cameras: world/scene, eye0/right eye, and eye1/left eye

papr 21 September, 2020, 14:12:38

@user-ec94b9 Are the eye0/1 windows still grey/white?

user-ec94b9 21 September, 2020, 14:15:51

"Plugin Gazer3D failed to initialize"

user-ec94b9 21 September, 2020, 14:16:02

Those two windows are gone...?

user-ec94b9 21 September, 2020, 14:16:06

I just have the real time window.

user-ec94b9 21 September, 2020, 14:17:44

I got the other two windows back 🙂

user-ec94b9 21 September, 2020, 14:17:49

Sorry for being so dumb LOL

papr 21 September, 2020, 14:18:31

@user-ec94b9 You will need to get all three cameras to work first, else you will get subsequent errors, e.g. Plugin Gazer3D failed to initialize

user-ec94b9 21 September, 2020, 14:23:06

Ugh, okay. I have all three cameras going, but am still getting the same error. I also can't get my pupils centres in eye0 and eye1

user-ec94b9 21 September, 2020, 14:28:32

How do I know if these are even working?

papr 21 September, 2020, 14:30:58

@user-ec94b9 Have you gone through the Getting Started guide already? If not, I highly recommend to have a look: https://docs.pupil-labs.com/core/

user-deed87 21 September, 2020, 17:21:36

Hi guys! I used Pupil Core glasses to obtain pupil/gaze positions data from two groups. I have done some visualizations with the Tutorials https://github.com/pupil-labs/pupil-tutorials; but now, I would like to use Python to (statistically) compare those groups (e.g., with student's T-test) using the available data in those datasets. Could anyone recommend me any Python code or paper+code or any ideas to handle those datasets and to perform between-group comparisons? Thank you!

papr 21 September, 2020, 17:23:48

@user-deed87 I can recommend https://pingouin-stats.org as a python lib for statistics. What data you want to compare between your groups highly depends on your research question/experiment

papr 21 September, 2020, 17:24:21

@user-deed87 I can also recommend having a look at their guidelines https://pingouin-stats.org/guidelines.html

user-deed87 21 September, 2020, 17:24:39

dear @papr thank you for your quick reply, I have two groups: frequent book readers vs. not frequent book readers, so I just want to make simple comparisons regarding their eye movements

papr 21 September, 2020, 17:26:11

@user-deed87 Have you setup surface tracking for the books? Sounds like you would want gaze that is mapped onto the book pages.

user-deed87 21 September, 2020, 17:27:07

Unfortunately I didn't gather the data, I am just doing the analyses and the only I got are two datasets: pupil_positions, gaze_positions

papr 21 September, 2020, 17:27:25

Without the scene video?

user-deed87 21 September, 2020, 17:27:29

I already normalized them (I stablished a confidence threshold)

user-deed87 21 September, 2020, 17:27:44

that's the only I have received

user-deed87 21 September, 2020, 17:27:53

for each individual

papr 21 September, 2020, 17:31:04

One thing you could do based on that is to calculate fixations and compare the mean fixation duration between the groups. Assuming the data is clean and only includes data while the subject was actually reading (difficult to tell without the scene video).

user-deed87 21 September, 2020, 17:31:44

I can start from that point

papr 21 September, 2020, 17:32:02

@user-deed87 But to be clear: You don't have a specific research question yet / you are doing explorative research?

user-deed87 21 September, 2020, 17:32:04

is there any Python code to calculate fixations

user-deed87 21 September, 2020, 17:32:22

explorative research

user-deed87 21 September, 2020, 17:34:48

to calculate fixations from the datasets I have

papr 21 September, 2020, 17:35:02

@user-deed87 If you had the original recording, you could use Pupil Player. Without it, you will have to extract the algorithm from here https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/fixation_detector.py

user-deed87 21 September, 2020, 17:37:38

Ohh I see, in that code, should I pass "gaze_positions" for the "gaze_data" argument in the "detect_fixations" function

user-deed87 21 September, 2020, 17:37:53

"gaze_positions.csv" I mean

papr 21 September, 2020, 17:39:54

You might need to transform the data into dicts. I do not remember the exact input format by heart

user-deed87 21 September, 2020, 17:40:23

Ohhh I see

user-deed87 21 September, 2020, 17:40:36

well, that's a good starting point, thank you for your time!

user-c0fead 22 September, 2020, 15:19:39

Hi everyone ! I am really beginner in pupil (plug-ins) developpement. When I try to find the (native) plug-ins files in my windows folder "(user)\pupil_capture_settings\plugins", I don't find anything (while they are displayed in "plug-in manager"). Can you please tell me if it is a normal thing ?

user-c5fb8b 22 September, 2020, 15:22:07

Hi @user-c0fead, this folder is only intended for user plugins. You can write your own plugins and place them there, Pupil will the load these on startup. The native plugins are incorporated in Pupil's source code, which you can find on GitHub: https://github.com/pupil-labs/pupil This separation is especially useful when you run Pupil from the prebuilt bundles, as these do not contain the raw source-code anymore, but still allow you to add custom user plugins that will be loaded at runtime.

user-c0fead 22 September, 2020, 15:25:49

Ok, thank you very much @user-c5fb8b .

user-c5fb8b 22 September, 2020, 15:26:13

@user-c0fead does that answer your question? Feel free to ask more, if things are still unclear!

user-c0fead 22 September, 2020, 15:30:00

Hum... truth to tell I have indeed one other question : when I try now to add a plug-in in "pupil capture" (I tried with "gcvlc" plug-in), adding the python scripts inside this folder (or the whole folder "gcvlc"), I don't however dont find this plug-in in my "plug-in manager" menu. Is there something more to find the added plug-ins inside "plug-in manager" ?

user-c5fb8b 22 September, 2020, 15:31:45

@user-c0fead Are you running Pupil from source or from bundle?

user-c0fead 22 September, 2020, 15:32:40

I am running from bundle.

user-c5fb8b 22 September, 2020, 15:33:41

When running from bundle, Pupil only supports a very limited set of user plugins, as it does not allow (without great effort) to import any Python library that we don't already include in the bundle. I would normally recommend to run Pupil from source when developing custom plugins. Would that be an issue for you?

user-c5fb8b 22 September, 2020, 15:35:13

The session settings (and corresponding plugins folder) can then be found in: path_to_pupil_source\pupil_capture_settings\plugins i.e. it keeps separate session settings when running from source

papr 22 September, 2020, 15:40:48

You can also create a symlink to the dependency in the user plugin folder if you want to run from source.

user-c0fead 22 September, 2020, 15:51:00

The session settings (and corresponding plugins folder) can then be found in: path_to_pupil_source\pupil_capture_settings\plugins i.e. it keeps separate session settings when running from source @user-c5fb8b I hope I am not in a wrong folder, but the folders I find inside the pupil source are ".travis", "deployment", "docs", "pupil_external" and "pupil_src". Did I misunderstand ?

user-c5fb8b 22 September, 2020, 15:53:17

@user-c0fead No, this is correct. The folder does not exist before you run Pupil once (and exit then). You can also just create the two folders there: \pupil_capture_settings\plugins

user-c5fb8b 22 September, 2020, 15:54:19

@user-c0fead do I understand correct that you are running on Windows? Please make sure you follow the dependency setup instructions from https://github.com/pupil-labs/pupil/blob/master/docs/dependencies-windows.md

user-c0fead 22 September, 2020, 16:05:56

Yes I am running on windows. Thank you for these elements. I am going to try this and won't hesitate to come back to you if other questions. 🙂

user-e6124a 23 September, 2020, 18:57:06

this might be a better place to ask this-- anyone have tips for getting an NDSI client running on iOS? all I've been able to find is Zyre and I don't understand it well enough to receive any data (though I have gotten to the point of seeing peers on the network)

user-c0fead 25 September, 2020, 12:48:06

Hi again ! I am coming back to you because it seems that I HAVE to run additional pupil plug-ins from the bundle, and not using the source (for admin reasons). I have already managed to use the plug-in "Pupil LSL Relay" in bundle, after having put "pupil_lsl_relay.py" inside the "plugins" folder, but I don't to do the same with file "display_recent_gaze.py" (I don't manage to find it in "Pupil Management").

display_recent_gaze.py

user-c0fead 25 September, 2020, 12:48:56

Can someone please help me to find how to solve my problem ?

user-c0fead 25 September, 2020, 12:49:43

it doesn't* do the same

user-c5fb8b 25 September, 2020, 12:52:12

@user-c0fead what do you mean with > I don't manage to find it in "Pupil Management"? Do you mean the plugin does not show up in the Plugin Manager menu?

user-c0fead 25 September, 2020, 12:52:38

Yes, that's what I mean.

user-c5fb8b 25 September, 2020, 12:53:38

@user-c0fead please share the log file with us, it might contain information on why your custom plugin is not being loaded. You can find it in: your user folder > pupil_capture_settings > capture.log

user-c0fead 25 September, 2020, 12:55:06

Ok, here you are.

capture.log

user-c5fb8b 25 September, 2020, 12:57:17

@user-c0fead you have an error in your plugin code display_recent_gaze.py All the code inside class Display_Recent_Gaze(System_Plugin_Base): has to be indended one tab to the right. Currently all the code is outside of the class, it is basically an empty plugin and therefore does not show up.

papr 25 September, 2020, 12:59:37

@user-c0fead @user-c5fb8b Also, system plugins are not listed in the plugin manager. I think display recent gaze is a default plugin, too

papr 25 September, 2020, 13:00:02

So there should not be the need to add it to you plugins folder

user-c0fead 25 September, 2020, 13:04:26

@papr Hum, truth to tell I looked at this file after reading Plugin class comment """ A simple example Plugin: 'display_recent_gaze.py' It is a good starting point to build your own plugin. """

user-c0fead 25 September, 2020, 13:05:26

This example does not show how to include a new plug-in in "Plug-in manager" ?

user-c0fead 25 September, 2020, 13:05:46

(because that's what I need too...)

user-c0fead 25 September, 2020, 13:07:10

(so a new and "[my] own" plugin)

user-c5fb8b 25 September, 2020, 13:07:57

@user-c0fead I guess that comment is very old already. I don't think the display_recent_gaze is the best starting poing for creating custom plugins anymore. We will update this comment. There's some information on our developer docs: https://docs.pupil-labs.com/developer/core/plugin-api/ Specifically there's the most simplest example plugin (that will show up in the Plugin Manager):

from plugin import Plugin

class MyCustomPlugin(Plugin):
    pass

If you save this as e.g. mycustomplugin.py in the plugins folder, this should show up in the Plugin Manager. Obviously it won't do anything yet, but that can be your starting point!

user-c0fead 25 September, 2020, 13:08:57

hum ok ok

user-c5fb8b 25 September, 2020, 13:09:28

@user-c0fead afterwards you should familiarize yourself with all methods of the Plugin class in plugin.py. You can overwrite any of these to add custom behavior to your plugin.

user-c0fead 25 September, 2020, 13:10:42

There is no kind of "Hello World !" plug-in (just to discover to the bases of the Plugin API...) ?

user-c0fead 25 September, 2020, 13:11:20

😉

user-c5fb8b 25 September, 2020, 13:13:16

@user-c0fead no we don't have something like that. I also recommend looking at other existing plugins to see how they accomplish their tasks. DisplayRecentGaze might not be a bad reference after all, but just keep in mind that every plugin inheriting from System_Plugin_Base is considered a system plugin and cannot be enabled/disabled in the Plugin Manager. The logic for what methods do what stays the same however.

user-c0fead 25 September, 2020, 13:16:10

hum ok. But if I change "Display_Recent_Gaze(System_Plugin_Base)" to "Display_Recent_Gaze(Plugin)", will it appear in "Pupil manager" ?

user-c5fb8b 25 September, 2020, 13:17:53

Theoretically yes, but please also change the class name as it might otherwise interfere with the existing Display_Recent_Gaze plugin. Also make sure you indend all code inside of the class (as I commented earlier).

user-c0fead 25 September, 2020, 13:23:24

ok, have I to change the file name too ?

user-c5fb8b 25 September, 2020, 13:23:47

no, the file name is not important, the plugins get loaded by their classname

user-c5fb8b 25 September, 2020, 13:25:25

you can overwrite pretty_class_name to change the display string, e.g.

    @property
    def pretty_class_name(self):
        return "My Plugin"

inside of your plugin will make it show up as "My Plugin" in the Plugin Manager.

user-c0fead 25 September, 2020, 13:30:03

Ok, but I tried with this new version of the file and does not work more.

display_recent_gaze.py

user-c0fead 25 September, 2020, 13:31:26

(also after adding the missing quotation mark at the end)

user-c5fb8b 25 September, 2020, 13:31:50

@user-c0fead please try with a minimal working example, e.g. the empty plugin I linked above. Make sure that this one shows up in the Plugin Manager. Then start exploring the Plugin API by adding one function at a time and verify that it does what you want.

user-c5fb8b 25 September, 2020, 13:32:24

Also the log file might help you to debug issues, it will print the errors that occur when loading a plugin

user-c5fb8b 25 September, 2020, 13:33:45

And additionally: developing a custom plugin while running from bundle might be very exhausting, because you are lacking proper debugging tools. If you cannot run from source on the computer you are at, I recommend finding another computer and setting up running from source there. After you have developed a stable, working plugin, you can just transfer it to a bundle.

user-c0fead 25 September, 2020, 13:36:52

Ok, "MyCustomPlugin" works. I will try to work from here and solve my problem for working for the source. Thank you very much ! 🙂

user-c5fb8b 25 September, 2020, 13:38:27

@user-c0fead great! Feel free to ask questions if there's anything unclear about the Plugin API.

user-8b0162 29 September, 2020, 05:50:56

Hi guys. I am using pupil glasses for eye tracking in one of my experiments. I want to play a video on my computer and the participants will be watching it. Now I want to capture the cordinates and pupil diameter corresponding to each frame of the video. I thought of using pyschopy to synchronise them. Is this is right way to go about it?

user-8b0162 29 September, 2020, 05:51:48

If so had anyone done anything like this. It would be really helpful if someone can guide me as this is my first time working with pupil glasses.

End of September archive