[Mne_analysis] Plotting multiple individual's dipole locations on standard brain

Andrew R. Dykstra andrew.r.dykstra at gmail.com
Thu Aug 18 03:41:19 EDT 2016
Search archives:

Hi Talitha,

If you are willing to change methods from dipole fits to mixed-norm
estimates, you could use this, particularly the irMxNE option:
http://martinos.org/mne/stable/auto_examples/inverse/plot_mixed_norm_inverse.html
.

If that's OK, then it's not too hard from there to go to the fsaverage
brain and plot dipole locations (or dipole density, depending on smoothing
parameters), like in panel B of Figures 3-5 here:
http://advances.sciencemag.org/content/1/10/e1500677.figures-only
Note that this step would require the individual MRIs to have been
processed by the entire Freesurfer
autorecon
 stream.

It would also allow you to (artificially) constrain the source space to the
superior temporal plane if you're confident that any other activity is
negligible. I achieved this by using each individual's dSPM solution as
weights to the MxNE after zeroing the activity in all non-STP vertices.
This can be empirically justified by the dSPM itself, if it shows only STP
source activity and the usual cross-sulcal mirrors, for example (see Fig.
2A of the same paper referenced above).

Finally, it wouldn't be too hard to color code dipole locations (or
density) for two different groups. If this sounds like it could work, let
me know and I can share some of the code I have privately.

Cheers,
Andy

On Sun, Aug 14, 2016 at 4:47 AM Talitha Ford <tcford at swin.edu.au> wrote:

> Hello,
>
> I was wondering whether anyone has used Dipole.plot_locations to plot the
> maximal dipole for a each subject/participant on the same brain structure
> (a standardised T1, for example)? I am interested in relative dipole
> location and strengths between two groups, for each hemisphere. So ideally
> would like to plot each participants left and right auditory dipole, on the
> same brain, with the groups differentiated by colour (e.g. blue for group1
> and red for group2).
>
> I have tried copying the pos of each individuals maximal dipole into
> sequential indices of the 1st individual Dipole object, however the pos
> won’t copy in.
>
>
>  evoked = mne.read_evokeds(fname_ave, baseline=(None, 0))[0]
> # crop at individual maximum peak latency and 1ms later
> evoked.crop(.15, .20 )
>
> # this plots each individual on a separate brain for the max dipole across
> the cortex
> for pid in [‘1’,’2’,’3’]:
>         # Fit a dipole
>         dip = mne.fit_dipole(evoked, fname_cov, fname_bem, fname_trans)[0]
>
>         m = dip.amplitude.max()
>         t = np.where(dip.amplitude == m)
>         idx = t[0][0]
>         dip[idx:idx+1].plot_locations(fname_trans, 'app'+pid, subjects_dir)
>
>
> # I tried something like this, to hack the position of the second
> participant into the index+1 of the max for participant 1 (if that makes
> sense)
> evoked_1 = mne.read_evokeds(fname_1, baseline=(None, 0))[0]
> dip_1 = mne.fit_dipole(evoked_1, fname_cov, fname_bem, fname_trans)[0]
> m = dip_1.amplitude.max()
> t = np.where(dip_1.amplitude == m)
> idx_1 = t[0][0]
>
> evoked_2 = mne.read_evokeds(fname_2, baseline=(None, 0))[0]
> dip_2 = mne.fit_dipole(evoked_2, fname_cov, fname_bem, fname_trans)[0]
> m = dip_2.amplitude.max()
> t = np.where(dip_2.amplitude == m)
> idx_2 = t[0][0]
>
> dip_1[idx_1+1].pos = dip_2[idx_2].pos # this doesnt copy
>
> I tried several variations of copy
> dip_1[idx_1+1][:].pos = dip_2[idx_2][:].pos
> dip_1[idx_1+1][:].pos[:] = dip_2[idx_2][:].pos[:]
> dip_1[idx_1+1][:].pos = copy(dip_2[idx_2][:].pos)
> etc.
>
> Any help would be greatly appreciated.
>
> Cheers,
> Talitha
>
>
>
> _______________________________________________
> 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.
>
-- 
Andrew R. Dykstra, PhD
Department of Neurology
Ruprecht-Karls-Universität Heidelberg
andrew.dykstra at med.uni-heidelberg.de
Europe: +49.157.7028.2162, North America: +1.786.263.9742
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160818/9fab919c/attachment.html 


More information about the Mne_analysis mailing list