[Mne_analysis] Fwd: Example on SPM Faces dataset - 2 questions
pascarel at dima.unige.it
pascarel at dima.unige.it
Fri Mar 25 11:25:11 EDT 2016
Hi Jakko,
thks a lot for your answers.
About point 1), when I read the fif file, I get this info
raw.info['dig']
Out[89]:
[{'coord_frame': 4,
'ident': 3,
'kind': 2,
'r': array([ 4.30736691e-09, 9.82968360e-02, 0.00000000e+00],
dtype=float32)},
{'coord_frame': 4,
'ident': 1,
'kind': 2,
'r': array([ -7.32455477e-02, -3.20142135e-09, 0.00000000e+00],
dtype=float32)},
{'coord_frame': 4,
'ident': 2,
'kind': 2,
'r': array([ 7.07898811e-02, 2.96859071e-09, 0.00000000e+00],
dtype=float32)}]
I think there are 2 bugs, since
i) the value of 'kind' it would be FIFF.FIFFV_POINT_CARDINAL=1
while now it is FIFF.FIFFV_POINT_HPI=2
Indeed, I cannot see these points in the GUI if I don't change these values
and write the raw file with this update information
ii) Furthermore also ident values don't seem correct...the right value
would be
raw.info['dig'][0]['ident'] = 2
raw.info['dig'][1]['ident'] = 1
raw.info['dig'][2]['ident'] = 3
Are u agree?
About my second point I'll follow the issue
Thks a lot!
kind regards,
Annalisa
Jaakko Leppäkangas <jaeilepp at student.jyu.fi> ha scritto:
> Hi Annalisa,
>
> the landmarks are transformed to RAS coordinate system when the data is
> converted to fif format. As the constant definitions map to nasion = 2, lpa
> =1 and rpa = 3 ('ident' in chs) they seem correct to me.
>
> The second point seems like a bug to me. I've opened an issue here
> https://github.com/mne-tools/mne-python/issues/3071
>
> -Jaakko
>
> On 24 March 2016 at 22:04, <pascarel at dima.unige.it> wrote:
>
>> Dear MNE users,
>>
>> I came back with a problem using mne.gui.coregistration() with CTF data.
>>
>> I loaded the spm sbj and the raw file
>> SPM_CTF_MEG_example_faces1_3D_raw.fif and
>>
>> 1) I couldn't see Fiducial points
>> 2) I couldn't see the MEG sensors
>>
>> About point 1) the problem is that Christian Brodbeck wrote in the
>> email I attached.
>> If I change the 'kind' key of raw.info['dig'] to FIFF.FIFFV_POINT_CARDINAL
>> I'm able to see the fiducial points in the GUI, even if I think there is
>> probably
>> a mistake in assignment the nasion, lpa and rpa.
>> I think the right assignment should be
>>
>> raw.info['dig'][0]['ident'] = 2
>> raw.info['dig'][1]['ident'] = 1
>> raw.info['dig'][2]['ident'] = 3
>>
>> Does it make sense?
>>
>> About point 2) I thought the problem could be the 'coil_type' of
>> raw.info['chs']
>> has
>> the value 201609. I tried to change this value but it didn't happen when
>> I import the data in the GUI.
>>
>>
>> I also tried to perform the co-registration in mne_analyze but when I
>> import the
>> raw file I get the following error message
>> No suitable coordinate transformation found in
>> SPM_CTF_MEG_example_faces1_3D_raw.fif
>>
>> Thanks for any suggestions!
>>
>> best regards
>> Annalisa
>>
>>
>>
>> ----- Messaggio inoltrato da Christian Brodbeck <christianbrodbeck at nyu.edu>
>> -----
>> Data: Mon, 5 Oct 2015 10:02:22 -0400
>> Da: Christian Brodbeck <christianbrodbeck at nyu.edu>
>> Rispondi-A: Discussion and support forum for the users of MNE Software <
>> mne_analysis at nmr.mgh.harvard.edu>
>> Oggetto: Re: [Mne_analysis] Example on SPM Faces dataset - 2 questions
>> A: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
>> Cc: Discussion and support forum for the users of MNE Software <
>> mne_analysis at nmr.mgh.harvard.edu>
>>
>> Looking at the spm-faces raw info:
>>
>> In [3]: raw.info['dig']
>> Out[3]:
>> [{'coord_frame': 4,
>> 'ident': 3,
>> 'kind': 2,
>> 'r': array([ 4.30736691e-09, 9.82968360e-02, 0.00000000e+00],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 1,
>> 'kind': 2,
>> 'r': array([ -7.32455477e-02, -3.20142135e-09, 0.00000000e+00],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 2,
>> 'kind': 2,
>> 'r': array([ 7.07898811e-02, 2.96859071e-09, 0.00000000e+00],
>> dtype=float32)}]
>>
>> but in the GUI we are selecting fiducial points with
>>
>> d['kind'] == FIFF.FIFFV_POINT_CARDINAL
>> and
>>
>> In [8]: FIFF.FIFFV_POINT_CARDINAL
>> Out[8]: 1
>> In [12]: FIFF.FIFFV_POINT_HPI
>> Out[12]: 2
>>
>> so, is there something wrong with the spm-faces file (Fiducials stored as
>> HPI)? Or are fiducials sometimes identical with HPI and the GUI should use
>> them as such?
>>
>> The latter would actually cause a conflict with our KIT files, because HPI
>> points and fiducials which are not identical have the same “ident”:
>>
>> In [16]: [d for d in kraw.info['dig'] if d['kind'] < 3]
>> Out[16]:
>> [{'coord_frame': 4,
>> 'ident': 2,
>> 'kind': 1,
>> 'r': array([ 0.00000000e+00, 1.07987508e-01, -1.38777878e-17],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 1,
>> 'kind': 1,
>> 'r': array([ -7.57353827e-02, 1.04083409e-17, 1.38777878e-17],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 3,
>> 'kind': 1,
>> 'r': array([ 6.99156001e-02, 0.00000000e+00, 1.38777878e-17],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 0,
>> 'kind': 2,
>> 'r': array([-0.07321275, 0.0070182 , -0.00094954], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 1,
>> 'kind': 2,
>> 'r': array([ 0.06706881, 0.01023183, -0.00318275], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 2,
>> 'kind': 2,
>> 'r': array([ 0.00344993, 0.11684198, 0.02777481], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 3,
>> 'kind': 2,
>> 'r': array([-0.03729108, 0.1059907 , 0.03130391], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 4,
>> 'kind': 2,
>> 'r': array([ 0.0470689 , 0.09996997, 0.03072358], dtype=float32)}]
>>
>> Although a potential solution could use HPI only if no Cardinal points are
>> present?
>>
>>
>>
>>
>> On Oct 4, 2015, at 11:02 AM, Alexandre Gramfort <
>>> alexandre.gramfort at telecom-paristech.fr> wrote:
>>>
>>> hi Annalisa,
>>>
>>> I have two different questions about the example
>>>> plot_spm_faces_dataset.py.
>>>>
>>>> 1) If I run the code and I try to plot the ICA components on time
>>>>
>>>> show_picks = numpy.abs(eog_scores).argsort()[::-1][:5]
>>>>>>> fig1=ica.plot_sources(raw, show_picks, exclude=eog_inds)
>>>>>>>
>>>>>>
>>>> I obtain the figure u find in attachment.
>>>> My question is: why do I see the ref channels?
>>>>
>>>> In the old mne-python version I had a different layout, as that
>>>> shown in plot_ica_from_raw.py.
>>>>
>>>> What's wrong?
>>>>
>>>
>>> we improved the layout. But indeed there is no point is showing the
>>> meg reference channels.
>>>
>>> We'll fix it this week.
>>>
>>> 2) I tried to co-register using mne.gui.coregistration()
>>>>
>>>> I load the spm sbj and the raw file
>>>> SPM_CTF_MEG_example_faces1_3D_raw.fif.
>>>> Does this file contain only the fiducial points?
>>>>
>>>
>>> yes
>>>
>>> If yes, when I load the raw file I can't see the fiducials in the gui.
>>>>
>>>
>>> maybe Christian knows. Do you see them with mne_analyze?
>>>
>>> Where I'm making a mistake?
>>>>
>>>
>>> I don't think you do :)
>>>
>>> Best,
>>> Alex
>>>
>>
>> ----- Fine messaggio inoltrato. -----
>>
>> --
>> Dott. Annalisa Pascarella
>> Istituto per le Applicazioni del Calcolo "M. Picone"
>> Consiglio Nazionale delle Ricerche
>> Via dei Taurini 19, 00185 Roma (Italy)
>> Ph.:+39-0649270946; Fax:+39-064404306
>>
>>
>> ---------- Forwarded message ----------
>> From: Christian Brodbeck <christianbrodbeck at nyu.edu>
>> To: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
>> Cc: Discussion and support forum for the users of MNE Software <
>> mne_analysis at nmr.mgh.harvard.edu>
>> Date: Mon, 5 Oct 2015 10:02:22 -0400
>> Subject: Re: [Mne_analysis] Example on SPM Faces dataset - 2 questions
>> Looking at the spm-faces raw info:
>>
>> In [3]: raw.info['dig']
>> Out[3]:
>> [{'coord_frame': 4,
>> 'ident': 3,
>> 'kind': 2,
>> 'r': array([ 4.30736691e-09, 9.82968360e-02, 0.00000000e+00],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 1,
>> 'kind': 2,
>> 'r': array([ -7.32455477e-02, -3.20142135e-09, 0.00000000e+00],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 2,
>> 'kind': 2,
>> 'r': array([ 7.07898811e-02, 2.96859071e-09, 0.00000000e+00],
>> dtype=float32)}]
>>
>> but in the GUI we are selecting fiducial points with
>>
>> d['kind'] == FIFF.FIFFV_POINT_CARDINAL
>>
>> and
>>
>> In [8]: FIFF.FIFFV_POINT_CARDINAL
>> Out[8]: 1
>> In [12]: FIFF.FIFFV_POINT_HPI
>> Out[12]: 2
>>
>> so, is there something wrong with the spm-faces file (Fiducials stored as
>> HPI)? Or are fiducials sometimes identical with HPI and the GUI should use
>> them as such?
>>
>> The latter would actually cause a conflict with our KIT files, because HPI
>> points and fiducials which are not identical have the same “ident”:
>>
>> In [16]: [d for d in kraw.info['dig'] if d['kind'] < 3]
>> Out[16]:
>> [{'coord_frame': 4,
>> 'ident': 2,
>> 'kind': 1,
>> 'r': array([ 0.00000000e+00, 1.07987508e-01, -1.38777878e-17],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 1,
>> 'kind': 1,
>> 'r': array([ -7.57353827e-02, 1.04083409e-17, 1.38777878e-17],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 3,
>> 'kind': 1,
>> 'r': array([ 6.99156001e-02, 0.00000000e+00, 1.38777878e-17],
>> dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 0,
>> 'kind': 2,
>> 'r': array([-0.07321275, 0.0070182 , -0.00094954], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 1,
>> 'kind': 2,
>> 'r': array([ 0.06706881, 0.01023183, -0.00318275], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 2,
>> 'kind': 2,
>> 'r': array([ 0.00344993, 0.11684198, 0.02777481], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 3,
>> 'kind': 2,
>> 'r': array([-0.03729108, 0.1059907 , 0.03130391], dtype=float32)},
>> {'coord_frame': 4,
>> 'ident': 4,
>> 'kind': 2,
>> 'r': array([ 0.0470689 , 0.09996997, 0.03072358], dtype=float32)}]
>>
>> Although a potential solution could use HPI only if no Cardinal points are
>> present?
>>
>>
>>
>>
>> On Oct 4, 2015, at 11:02 AM, Alexandre Gramfort <
>> alexandre.gramfort at telecom-paristech.fr> wrote:
>>
>> hi Annalisa,
>>
>> I have two different questions about the example plot_spm_faces_dataset.py.
>>
>> 1) If I run the code and I try to plot the ICA components on time
>>
>> show_picks = numpy.abs(eog_scores).argsort()[::-1][:5]
>> fig1=ica.plot_sources(raw, show_picks, exclude=eog_inds)
>>
>>
>> I obtain the figure u find in attachment.
>> My question is: why do I see the ref channels?
>>
>> In the old mne-python version I had a different layout, as that
>> shown in plot_ica_from_raw.py.
>>
>> What's wrong?
>>
>>
>> we improved the layout. But indeed there is no point is showing the
>> meg reference channels.
>>
>> We'll fix it this week.
>>
>> 2) I tried to co-register using mne.gui.coregistration()
>>
>> I load the spm sbj and the raw file
>> SPM_CTF_MEG_example_faces1_3D_raw.fif.
>> Does this file contain only the fiducial points?
>>
>>
>> yes
>>
>> If yes, when I load the raw file I can't see the fiducials in the gui.
>>
>>
>> maybe Christian knows. Do you see them with mne_analyze?
>>
>> Where I'm making a mistake?
>>
>>
>> I don't think you do :)
>>
>> Best,
>> Alex
>>
>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in
>> error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in
>> error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
--
Dott. Annalisa Pascarella
Istituto per le Applicazioni del Calcolo "M. Picone"
Consiglio Nazionale delle Ricerche
Via dei Taurini 19, 00185 Roma (Italy)
Ph.:+39-0649270946; Fax:+39-064404306
More information about the Mne_analysis
mailing list