<div dir="ltr"><p>I noticed that the default python distribution on the Martinos system
 was using MNE 0.8. Switched to the anaconda distribution which was 
using MNE 0.9.</p>

<p>After working through some bugs related to the version change, I no longer get the error I reported before. </p>

<p>Sorry for wasting your time!</p><p>Emily<br></p><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 18, 2015 at 4:02 PM, Emily Stephen <span dir="ltr">&lt;<a href="mailto:emilyps14@gmail.com" target="_blank">emilyps14@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Update:<br><br></div><div>(1) Re Hari&#39;s suggestion<br><br></div>I tried converting the fif file to a hpts file using the C implementation:<br></div>(from the shell)<br>mne_convert_dig_data --fif $SUBJECT.fif --hptsout $SUBJECT.hpts --headcoord<br><br></div>(from python)<br>digfile_hpts = op.join(subjects_dir, subject, subject + &#39;.hpts&#39;)<br>montage = mne.channels.read_montage(digfile_hpts)<br>raw = mne.io.read_raw_brainvision(subjects_dir + subject + &#39;/&#39; + subject + &#39;.vhdr&#39;,<br>                                  montage=montage, verbose=None, preload=False)<br><br></div>This raises a new error:<br>None of the sensors defined in the montage were found in the info structure. Check the channel names.<br><br></div>The
 channel names in the montage are of the form &#39;0001&#39; ... &#39;0291&#39;, with 
duplicated &#39;0001&#39; ... &#39;0064&#39; at the end. The channel names in the raw 
data are of the form &#39;01&#39; ... &#39;64&#39;.<br><br></div><div>I noticed that the
 first column in the .hpts file has &#39;eeg&#39; for the last 64 rows (vs 
&#39;cardinal&#39;, &#39;hpi&#39;, and &#39;extra&#39; for the previous ones). This first column
 isn&#39;t being used by read_montage, but I think it is what distinguishes 
the eeg channel locations from the other digitizer info.<br><br></div><div>I
 could manually change the channel names in the .hpts file to &#39;01&#39; ... 
&#39;64&#39; for those rows, to match the channel names in the Brainvision file.
 Not a pretty solution, but it might work.<br><br></div><div>(2) Re Eric&#39;s comment<br><br></div><div>I&#39;d be happy to cut down the script/files. Where should I upload files? I&#39;m at Martinos, want to be sure to follow HIPAA etc. <br><br></div><div>In the meantime, I&#39;ve created an issue on github linking back to this thread.<br><br></div><div>Thanks,<br></div>Emily<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 18, 2015 at 8:44 AM,  <span dir="ltr">&lt;<a href="mailto:mne_analysis-request@nmr.mgh.harvard.edu" target="_blank">mne_analysis-request@nmr.mgh.harvard.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Mne_analysis mailing list submissions to<br>
        <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:mne_analysis-request@nmr.mgh.harvard.edu" target="_blank">mne_analysis-request@nmr.mgh.harvard.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:mne_analysis-owner@nmr.mgh.harvard.edu" target="_blank">mne_analysis-owner@nmr.mgh.harvard.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Mne_analysis digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Error running make_forward_solution: Head&lt;--&gt;sensor       transform<br>
      not found (Emily Stephen)<br>
   2. Re: Error running make_forward_solution: Head&lt;--&gt;sensor<br>
      transform not found (Hari Bharadwaj)<br>
   3. Re: Error running make_forward_solution: Head&lt;--&gt;sensor<br>
      transform not found (Eric Larson)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 17 Nov 2015 19:07:05 -0500<br>
From: Emily Stephen &lt;<a href="mailto:emilyps14@gmail.com" target="_blank">emilyps14@gmail.com</a>&gt;<br>
Subject: [Mne_analysis] Error running make_forward_solution:<span class=""><br>
        Head&lt;--&gt;sensor  transform not found<br></span>
To: <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.edu</a><br>
Message-ID:<br>
        &lt;CAHgMKiV9thqbaSLYNU31jCZ4FCdUoYbraAUW3=+<a href="mailto:o4wM%2BCSBJqA@mail.gmail.com" target="_blank">o4wM+CSBJqA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<div><div class="h5"><br>
<br>
Hi All,<br>
<br>
I&#39;m getting an error when I run mne.make_forward_solution, but only if I<br>
try to save the result.<br>
<br>
That is, if I set fname=None then the whole thing runs fine, but if I set<br>
fname=&lt;filename&gt;, it fails in the call to write_forward_solution with the<br>
error:<br>
Head&lt;--&gt;sensor transform not found<br>
<br>
Seems like write_forward_solution is expecting values in info under<br>
dev_head_t or ctf_head_t, which never got set.<br>
<br>
I think it may be related to the fact that I&#39;m loading (just EEG) data from<br>
a brainvision file using mne.io.read_raw_brainvision.<br>
<br>
I&#39;ve been struggling to figure out how to include the digitizer information<br>
in the preprocessed data. My digitizer info is in a .fif file that<br>
otherwise doesn&#39;t contain any measurement data (I can&#39;t even figure out how<br>
to load it using the python MNE). So far the only thing I&#39;ve done with that<br>
file is to use it to update the channel locations with a call to the C<br>
implementation:<br>
    call([&#39;mne_check_eeg_locations&#39;,<br>
          &#39;--file&#39;, fname,<br>
          &#39;--dig&#39;, op.join(subjects_dir,subject,subject + &#39;.fif&#39;),<br>
          &#39;--fix&#39;])<br>
<br>
I&#39;m new to all of this (including python) so any help would be much<br>
appreciated! I&#39;ve attached the code (apologies for the mess).<br>
<br>
Thanks,<br>
Emily<br></div></div>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151117/e57b3044/attachment-0001.html" rel="noreferrer" target="_blank">http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151117/e57b3044/attachment-0001.html</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: test_eeganes07_151112.py<br>
Type: text/x-python-script<br>
Size: 4538 bytes<br>
Desc: not available<br>
Url : <a href="http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151117/e57b3044/attachment-0001.bin" rel="noreferrer" target="_blank">http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151117/e57b3044/attachment-0001.bin</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 17 Nov 2015 22:13:03 -0500 (EST)<br>
From: &quot;Hari Bharadwaj&quot; &lt;<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a>&gt;<br>
Subject: Re: [Mne_analysis] Error running make_forward_solution:<span class=""><br>
        Head&lt;--&gt;sensor transform not found<br></span>
To: &quot;Discussion and support forum for the users of MNE Software&quot;<br>
        &lt;<a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.edu</a>&gt;<br>
Cc: <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.edu</a><br>
Message-ID:<br>
        &lt;<a href="mailto:51230.24.34.210.250.1447816383.squirrel@mail.nmr.mgh.harvard.edu" target="_blank">51230.24.34.210.250.1447816383.squirrel@mail.nmr.mgh.harvard.edu</a>&gt;<br>
Content-Type: text/plain;charset=iso-8859-1<br>
<br>
Hi Emily,<br>
   Perhaps you could try converting the digitization data to one of the<br>
formats (e.g., .hpts) accepted by mne.channels.read_montage(.) using<br>
the C-version of mne_convert_dig_data (if they are already not<br>
available in one of those formats). Once you do that and read it into<br>
python as a Montage object using mne.channels.read_montage(.), you<br>
could supply it as to the montage argument in<br>
mne.io.read_raw_brainvision(.).<br>
<br>
Also, the digitization data should contain cardinal points (like nasion,<br>
LPA, RAP) for the head along with the EEG sensor locations.. That way,<br>
&quot;head coordinated&quot; and &quot;sensor coordinates&quot; can be matched in the Montage.<br>
<br>
HTH,<br>
Hari<div><div class="h5"><br>
<br>
<br>
On Tue, November 17, 2015 7:07 pm, Emily Stephen wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I&#39;m getting an error when I run mne.make_forward_solution, but only if I<br>
&gt; try to save the result.<br>
&gt;<br>
&gt; That is, if I set fname=None then the whole thing runs fine, but if I set<br>
&gt; fname=&lt;filename&gt;, it fails in the call to write_forward_solution with the<br>
&gt; error:<br>
&gt; Head&lt;--&gt;sensor transform not found<br>
&gt;<br>
&gt; Seems like write_forward_solution is expecting values in info under<br>
&gt; dev_head_t or ctf_head_t, which never got set.<br>
&gt;<br>
&gt; I think it may be related to the fact that I&#39;m loading (just EEG) data<br>
&gt; from<br>
&gt; a brainvision file using mne.io.read_raw_brainvision.<br>
&gt;<br>
&gt; I&#39;ve been struggling to figure out how to include the digitizer<br>
&gt; information<br>
&gt; in the preprocessed data. My digitizer info is in a .fif file that<br>
&gt; otherwise doesn&#39;t contain any measurement data (I can&#39;t even figure out<br>
&gt; how<br>
&gt; to load it using the python MNE). So far the only thing I&#39;ve done with<br>
&gt; that<br>
&gt; file is to use it to update the channel locations with a call to the C<br>
&gt; implementation:<br>
&gt;     call([&#39;mne_check_eeg_locations&#39;,<br>
&gt;           &#39;--file&#39;, fname,<br>
&gt;           &#39;--dig&#39;, op.join(subjects_dir,subject,subject + &#39;.fif&#39;),<br>
&gt;           &#39;--fix&#39;])<br>
&gt;<br>
&gt; I&#39;m new to all of this (including python) so any help would be much<br>
&gt; appreciated! I&#39;ve attached the code (apologies for the mess).<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Emily<br></div></div>
&gt; _______________________________________________<br>
&gt; Mne_analysis mailing list<br>
&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
--<br>
Hari Bharadwaj<br>
Research Fellow<br>
Martinos Center for Biomedical Imaging,<br>
Massachusetts General Hospital<br>
149 Thirteenth Street,<br>
Charlestown, MA 02129<br>
<br>
<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a><br>
Ph: <a href="tel:734-883-5954" value="+17348835954" target="_blank">734-883-5954</a><br>
<a href="http://www.haribharadwaj.com" rel="noreferrer" target="_blank">www.haribharadwaj.com</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 18 Nov 2015 08:44:22 -0500<br>
From: Eric Larson &lt;<a href="mailto:larson.eric.d@gmail.com" target="_blank">larson.eric.d@gmail.com</a>&gt;<br>
Subject: Re: [Mne_analysis] Error running make_forward_solution:<span class=""><br>
        Head&lt;--&gt;sensor transform not found<br></span>
To: Discussion and support forum for the users of MNE Software<br>
        &lt;<a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.edu</a>&gt;<br>
Message-ID:<br>
        &lt;CAGu2niVt3EnAv1566f=<a href="mailto:JjFWXVBof-yrC09f0M_%2BNTs60mKrPrg@mail.gmail.com" target="_blank">JjFWXVBof-yrC09f0M_+NTs60mKrPrg@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Can you simplify the script to use a minimal number of files and lines to<br>
reproduce the error (e.g., hopefully it doesn&#39;t depend on bad channels at<br>
all), and upload the necessary files and script somewhere? I guess that<br>
error could happen if you only have sensors in head coordinates to start<br>
with -- we can probably work around it.<br>
<br>
It shouldn&#39;t be too difficult to add that digitization information without<br>
having to resort to MNE-C tools. Feel free to open an mne-python issue<br>
about this stuff so we can hash out a solution, then we can report back to<br>
this thread.<br>
<br>
Eric<br>
<br>
<br>
On Tue, Nov 17, 2015 at 10:13 PM, Hari Bharadwaj &lt;<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a>&gt;<br>
wrote:<br>
<br>
&gt; Hi Emily,<br>
&gt;    Perhaps you could try converting the digitization data to one of the<br>
&gt; formats (e.g., .hpts) accepted by mne.channels.read_montage(.) using<br>
&gt; the C-version of mne_convert_dig_data (if they are already not<br>
&gt; available in one of those formats). Once you do that and read it into<br>
&gt; python as a Montage object using mne.channels.read_montage(.), you<br>
&gt; could supply it as to the montage argument in<br>
&gt; mne.io.read_raw_brainvision(.).<br>
&gt;<br>
&gt; Also, the digitization data should contain cardinal points (like nasion,<br>
&gt; LPA, RAP) for the head along with the EEG sensor locations.. That way,<br>
&gt; &quot;head coordinated&quot; and &quot;sensor coordinates&quot; can be matched in the Montage.<br>
&gt;<br>
&gt; HTH,<br>
&gt; Hari<div><div class="h5"><br>
&gt;<br>
&gt;<br>
&gt; On Tue, November 17, 2015 7:07 pm, Emily Stephen wrote:<br>
&gt; &gt; Hi All,<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m getting an error when I run mne.make_forward_solution, but only if I<br>
&gt; &gt; try to save the result.<br>
&gt; &gt;<br>
&gt; &gt; That is, if I set fname=None then the whole thing runs fine, but if I set<br>
&gt; &gt; fname=&lt;filename&gt;, it fails in the call to write_forward_solution with the<br>
&gt; &gt; error:<br>
&gt; &gt; Head&lt;--&gt;sensor transform not found<br>
&gt; &gt;<br>
&gt; &gt; Seems like write_forward_solution is expecting values in info under<br>
&gt; &gt; dev_head_t or ctf_head_t, which never got set.<br>
&gt; &gt;<br>
&gt; &gt; I think it may be related to the fact that I&#39;m loading (just EEG) data<br>
&gt; &gt; from<br>
&gt; &gt; a brainvision file using mne.io.read_raw_brainvision.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;ve been struggling to figure out how to include the digitizer<br>
&gt; &gt; information<br>
&gt; &gt; in the preprocessed data. My digitizer info is in a .fif file that<br>
&gt; &gt; otherwise doesn&#39;t contain any measurement data (I can&#39;t even figure out<br>
&gt; &gt; how<br>
&gt; &gt; to load it using the python MNE). So far the only thing I&#39;ve done with<br>
&gt; &gt; that<br>
&gt; &gt; file is to use it to update the channel locations with a call to the C<br>
&gt; &gt; implementation:<br>
&gt; &gt;     call([&#39;mne_check_eeg_locations&#39;,<br>
&gt; &gt;           &#39;--file&#39;, fname,<br>
&gt; &gt;           &#39;--dig&#39;, op.join(subjects_dir,subject,subject + &#39;.fif&#39;),<br>
&gt; &gt;           &#39;--fix&#39;])<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m new to all of this (including python) so any help would be much<br>
&gt; &gt; appreciated! I&#39;ve attached the code (apologies for the mess).<br>
&gt; &gt;<br>
&gt; &gt; Thanks,<br>
&gt; &gt; Emily<br></div></div>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Mne_analysis mailing list<br>
&gt; &gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
&gt; &gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Hari Bharadwaj<br>
&gt; Research Fellow<br>
&gt; Martinos Center for Biomedical Imaging,<br>
&gt; Massachusetts General Hospital<br>
&gt; 149 Thirteenth Street,<br>
&gt; Charlestown, MA 02129<br>
&gt;<br>
&gt; <a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a><br>
&gt; Ph: <a href="tel:734-883-5954" value="+17348835954" target="_blank">734-883-5954</a><br>
&gt; <a href="http://www.haribharadwaj.com" rel="noreferrer" target="_blank">www.haribharadwaj.com</a><br>
&gt; _______________________________________________<br>
&gt; Mne_analysis mailing list<br>
&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
&gt;<br>
&gt;<br>
&gt; The information in this e-mail is intended only for the person to whom it<br>
&gt; is<br>
&gt; addressed. If you believe this e-mail was sent to you in error and the<br>
&gt; e-mail<br>
&gt; contains patient information, please contact the Partners Compliance<br>
&gt; HelpLine at<br>
&gt; <a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in<br>
&gt; error<br>
&gt; but does not contain patient information, please contact the sender and<br>
&gt; properly<br>
&gt; dispose of the e-mail.<br>
&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151118/33c316c2/attachment.html" rel="noreferrer" target="_blank">http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151118/33c316c2/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
End of Mne_analysis Digest, Vol 94, Issue 7<br>
*******************************************<br>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div>