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

MRG, BUG: Fix support for KIT Berlin #8542

Merged
merged 3 commits into from Nov 22, 2020
Merged

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Nov 18, 2020

@UrbanM simplifying your example to get rid of all of the scalings stuff and doing:

python -ic "import mne; mne.io.read_raw_kit("data.con").plot()"

Screen Shot 2020-11-18 at 5 28 46 PM

You'll notice that the scale bar for EEG data is 40 uV. Your plot from version 0.20 had a pretty wild 400000.0 uV scale bar which suggests things were wrong there, too (although at least they were non-zero!).

This almost certainly isn't correct, unless I got very lucky -- I need to dig into why your exg_gains are all zero. And if those are being read correctly as zero, what the actually correct fallback gain is to use. Can you browse these data in some KIT (or other) software and let me know what the correct voltage of some value in some EEG channel at some time is supposed to be? For example, E14 at 28.77 seconds seems to be the top of a fairly smooth peak.

I also have no idea if the names I gave to these constants are consistent, feel free to look at the diff and comment @UrbanM!

Closes #8535

@UrbanM
Copy link

UrbanM commented Nov 19, 2020

@larsoner thank you very much for all your work. I'm sorry for this bad example, initially these channels in the system were made for measuring EEG, but here we don't really measure the EEG signal, but the voltage from the new OPM MEG sensors, that is the reason for these high amplitudes. We multiply these values with a gain factor to obtain the magnetic fields. Here is a picture from the MegLaboratory (a software provided from the manufacturer of the MEG device). In this program the value of the channel E14 at time 28.77s is -2.55V. I can ask the manager of the device if he has some old data where they really measured EEG signal, would that help?
Screenshot from 2020-11-19 10-10-04
Screenshot from 2020-11-19 10-31-29

@larsoner
Copy link
Member Author

@UrbanM is it okay for me to add the dataset you created to the MNE-testing-data dataset? It would be nice to add a little test that the value obtained for that channel is correct. Could you also look at some MEG channel at some time and give me a value in the manufacturer's software? That way I can spot check them, too.

mne/io/kit/constants.py Outdated Show resolved Hide resolved
mne/io/kit/constants.py Outdated Show resolved Hide resolved
mne/io/kit/kit.py Show resolved Hide resolved
@UrbanM
Copy link

UrbanM commented Nov 19, 2020

@larsoner I will try to provide a better sample dataset without wild EEG channels. I checked the value of the MEG channel "MEG 003" in the manufacturers software at time 28.770 s it is -8.89 pT. I also checked the value with the MNE-python with your "kit" branch, i get the value -8.88592475e-12.

Screenshot from 2020-11-19 21-47-28

@larsoner
Copy link
Member Author

@larsoner I will try to provide a better sample dataset without wild EEG channels.

The current dataset is fine from the MNE-Python testing end of things. So I'm fine with putting it in MNE-testing-data, but if you don't want it living permanently there another similar short dataset is fine.

@UrbanM
Copy link

UrbanM commented Nov 20, 2020

Yes of course, if this dataset is OK, feel free to put it in MNE-testing-data.

@larsoner larsoner changed the title WIP: Add support for KIT Berlin MRG, BUG: Fix support for KIT Berlin Nov 20, 2020
@larsoner
Copy link
Member Author

@agramfort ready for review/merge from my end

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

@larsoner shall we backport?

@larsoner larsoner merged commit 92a29ff into mne-tools:master Nov 22, 2020
4 checks passed
@larsoner larsoner deleted the kit branch November 22, 2020 13:37
larsoner added a commit that referenced this pull request Nov 22, 2020
* WIP: Add support for KIT Berlin

* FIX: zero->AD

* TST: Add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem reading EEG channels of an old yokogawa KIT MEG system with the newest MNE version.
3 participants