Skip to content

Conversation

@scott-huberty
Copy link
Contributor

@scott-huberty scott-huberty commented Sep 11, 2024

closes #12756

  • Updated mne.defaults so that eyegaze channels are expected to be radians and pupil size channels are expected to be meters. When specifying the scalings, I matched the scalings with other MNE channel types that have a radians/meters unit (e.g. fnirs_fd_phase for radians, hbo/hbr for meters).

  • Updated the eyetracking tutorials such that eygaze units are converted to radians as early as possible.

Notable exceptions:

  • I did not update the example plot_eyetracking_heatmaps. I'd have to play with the code a bit to make the heatmap overlay with the stimulus image (which is in pixels) nicely. Maybe a follow up PR?
  • in this PR I did not demonstrate converting Eyelink Pupil size data to meters. As I've mentioned before I don't think this is trivial, and I have never done it with my Eyelink data. I might need to do it for an analysis in the coming months and so I would prefer to address this when I cross that bridge.

When setting scalings, I matched the scalings used for other channels of the same type:

- eyegaze == fnirs_df_phase == radians
- pupil == hbo/hbr == meters
@scott-huberty
Copy link
Contributor Author

Ok here is the built documentation for the Eyetracking tutorials. Marking as ready for review!

@scott-huberty scott-huberty marked this pull request as ready for review September 12, 2024 15:30
Comment on lines +110 to +111
custom_scalings = dict(pupil=1e3)
raw.pick(picks="eyetrack").plot(scalings=custom_scalings)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ends up a bit wacky:

image

If you set the units and scalings it will probably be more reasonable I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @larsoner Im not sure what you mean by setting the units and if you are referring to the eyegaze channel or pupil channel (I assume eyegaze) - Can you clarify?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant for plot_raw but I see now that we only have it for other viz functions like plot_evoked, so never mind! Also not sure it would actually help...

@larsoner larsoner merged commit 670330a into mne-tools:main Sep 13, 2024
@larsoner
Copy link
Member

Thanks @scott-huberty !

@drammock
Copy link
Member

drammock commented Sep 13, 2024

looking a bit late, but why is the unit for pupil µM instead of µm?? M is moles / molar

@larsoner
Copy link
Member

Ugh yes that seems like a bug...

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

Successfully merging this pull request may close these issues.

Inconsistent handling and documentation of pupil size units

4 participants