[pymvpa] searchlight analysis

Pegah Kassraian Fard pegahkf at gmail.com
Fri Sep 15 10:54:15 UTC 2017


So, now all the code seems to work except for the plotting, still.
A very python beginner question: How can I store the coordinates + the
corresponding accuracies? (e.g. in Matlab that could be done quite easily
with the ''save'' command).

Regarding plotting: I stored the outputed nifti, and of course I can open
it in MRIcron etc., but I'd prefer to be able to plot the results in a way
where the distribution of accuracies over space is visible (as in the
plotting example).

So, how comes the plotting still is so not-sensible?

Here code & attached again how the plot looks like, sorry for all the
questions!:-)

# plotting

plot_args = {
    'background' : 'Struct.nii',
   'background_mask' : 'brain.nii',
  'overlay_mask' : 'S1_mask.nii',
   'do_stretch_colors' : False,
    'cmap_bg' : 'gray',
    'cmap_overlay' : 'autumn', # YlOrRd_r # pl.cm.autumn
    'interactive' : cfg.getboolean('examples', 'interactive', True)
}

fig = pl.figure(figsize=(12, 4), facecolor='white')

subfig = plot_lightbox(
    overlay=niftiresults,
    vlim=(0.5, None), slices=range(23,31),
    fig=fig,
    background='Struct.nii',
    background_mask='brain.nii',
    overlay_mask='S1_mask.nii',
    **plot_args
)

pl.title('Accuracy distribution for radius %i' % radius_)

pl.show()
pl.savefig('plotResults')

On Wed, Sep 13, 2017 at 12:07 AM, Yaroslav Halchenko <yoh at onerussian.com>
wrote:

>
> On Tue, 12 Sep 2017, Pegah Kassraian Fard wrote:
>
> >    I would out-comment the line I would not need..so I do use the maximal
> >    accuracy.
> >    Attached is a plot..
>
> try to plot just a few slices
>
> or ideally just open that produced .nii.gz in any application you
> typically use for your visualization (FSLeyes, AFNI, whatnot)
>
> >    Many thanks
> >    On Tue, Sep 12, 2017 at 10:19 PM, Yaroslav Halchenko <
> yoh at onerussian.com>
> >    wrote:
>
> >      On Tue, 12 Sep 2017, Pegah Kassraian Fard wrote:
>
> >      >Â  Â  yes yes, when I ran the code I switch between these...so that
> >      was/is a
> >      >Â  Â  residuum of how I did it so far:)
>
> >      so your extremum is the minimal accuracy... how useful is that ;)?
> >      >Â  Â  Â  > now. I am yet classifying whole brain, just as a check.
> >      >Â  Â  Â  > Also,Ã*Â  the plotting seems completely off...and the
> output
> >      either
>
> >      what is "off" here? screenshot?
> >      >Â  Â  Â  > non-existent or really weird. Is there any chance anyone
> >      could quickly
> >      >Â  Â  Â  run
> >      >Â  Â  Â  > the code? Or would you have any other suggestions?
>
> >      might try later
>
> >      cheers,
> --
> Yaroslav O. Halchenko
> Center for Open Neuroscience     http://centerforopenneuroscience.org
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20170915/1a4f69d7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_5321331047995015525.png
Type: image/png
Size: 85683 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20170915/1a4f69d7/attachment-0001.png>


More information about the Pkg-ExpPsy-PyMVPA mailing list