{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/2700","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2700/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2700/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2700/events","html_url":"https://github.com/mne-tools/mne-python/issues/2700","id":122063798,"number":2700,"title":"Incorrect EEG lead field matrices due to missing reference electrode location","user":{"login":"emilyps14","id":4949989,"avatar_url":"https://avatars.githubusercontent.com/u/4949989?v=3","gravatar_id":"","url":"https://api.github.com/users/emilyps14","html_url":"https://github.com/emilyps14","followers_url":"https://api.github.com/users/emilyps14/followers","following_url":"https://api.github.com/users/emilyps14/following{/other_user}","gists_url":"https://api.github.com/users/emilyps14/gists{/gist_id}","starred_url":"https://api.github.com/users/emilyps14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilyps14/subscriptions","organizations_url":"https://api.github.com/users/emilyps14/orgs","repos_url":"https://api.github.com/users/emilyps14/repos","events_url":"https://api.github.com/users/emilyps14/events{/privacy}","received_events_url":"https://api.github.com/users/emilyps14/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-14T15:21:24Z","updated_at":"2015-12-16T17:38:47Z","closed_at":null,"body":"The location of the EEG reference electrode is not stored in the raw data, leading to incorrect lead field matrices.\r\n\r\nThe EEG reference location is used by the forward solution in the BEM calculation, accounting for the fact that the reference is effectively subtracted out from the signal during acquisition. \r\n\r\nThe forward solution code in both MNE C and MNE Python expects the reference electrode location to be stored in the second column of the position matrix (in python: info[chs][<#>][eeg_loc]). In the Python distribution, there is no way to populate this column.\r\n\r\nFor my data at least, the information is stored in the hpts montage file, so it would make sense to load the reference electrode location when the montage is loaded.\r\n\r\nFrom the mne_analysis mailing list:\r\nhttps://mail.nmr.mgh.harvard.edu/pipermail//mne_analysis/2015-December/003012.html\r\n\r\nCode to replicate the mismatch:\r\nhttps://drive.google.com/file/d/0B8PjVL8SDL7IdDVHWE40YTJSZnM/view?usp=drive_web"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/165187259","html_url":"https://github.com/mne-tools/mne-python/issues/2700#issuecomment-165187259","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2700","id":165187259,"user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T17:38:47Z","updated_at":"2015-12-16T17:38:47Z","body":"> (It would also be nice if there were a way to load a fif file as a montage, so I wouldn't have to do the conversion and modification. Seems like I'm the only person who has digitizer info in a fif file, though, so that may not be a priority)\r\n\r\nI agree it would be nice to have, and I don't think it should require too many lines of code to get it to work. Can you make as small as possible a BrainVision file that could be used with a given FIF-format montage that we can use in our test suite? It would allow us to develop the FIF-montage reading and the (developed on BrainVision but probably general) `loc`-setting simultaneously."}}