[Mne_analysis] make non reg/meg movie

Eric Larson larson.eric.d at gmail.com
Sun Oct 5 20:04:30 EDT 2014
Search archives:

I haven't had to deal with this specific problem -- I would apply
trial-and-error with a small number of time samples to converge on the
proper scale factor.

Eric


On Sun, Oct 5, 2014 at 1:15 PM, Gregory Kirk <gkirk at wisc.edu> wrote:

> solved all of those problems and getting a movie now, but the scale is
> waaaaay off. seems to me now i remember
> mne assumed the data was in pico volts or some other really small numbers,
> but the actuall data is short or long integers or something
> so internally mne applies some huge scaling.
>
> i rescalled my data from a variance range [0,1] my multiplying by 10,000
> thinking that would allow me to use
> the integer fmin, fthresh, etc. but now the cortex is solid yellow , i.e.
> everything abouve the max.
>
> and the little movie says
>
> 1.0 .. 50 ..150 * 1e-10
>
> so what internal scale do i need to account for, i.e. what scale should i
> apply to data in
> a variance range to get this to come out good?
>
> cheers,
>
> greg
>
> On 10/03/14, Eric Larson  wrote:
> > Sorry for not mentioning this earlier, you can also use this MATLAB
> function (which comes bundled with the MNE-C tools):
> >
> >
> https://github.com/mne-tools/mne-matlab/blob/master/matlab/mne_write_stc_file.m
> >
> >
> >
> > It looks like your code is quite close, I&#39;m not sure why it
> isn&#39;t working. Maybe try the above file. Also, make sure you write both
> -lh and -rh stc files, and have the proper number of vertices for the
> subject of interest (for each hemisphere).
> >
> >
> > Eric
> >
> >
> >
> > On Fri, Oct 3, 2014 at 2:21 PM, Gregory Kirk <gkirk at wisc.edu(javascript:main.compose()>
> wrote:
> >
> > > Hi
> > >
> > > seemed to follow the format of the python script and wrote a matlab
> file
> > > fid=fopen(&#39;var-lh.stc&#39;,&#39;w&#39;);
> > > tmin = 1;
> > > tstep = 2;
> > > load my_var
> > > sz = size(my_var)
> > > nvert=sz(1);
> > > ntime = sz(2);
> > > samp_rate = tstep*1000;
> > >
> > > fwrite(fid,tmin,&#39;float32&#39;);
> > > fwrite(fid,samp_rate,&#39;float32&#39;);
> > > fwrite(fid,nvert,&#39;uint32&#39;);
> > > verts = [0:nvert-1];
> > > fwrite(fid,verts,&#39;uint32&#39;);
> > > fwrite(fid,ntime,&#39;uint32&#39;);
> > > fwrite(fid,my_var,&#39;float32&#39;);
> > >
> > > mne_make_movie --stcin var --mov test.mov
> > >
> > > mne_make_movie seems to think t has no verticies
> > >
> > > mne_make_movie version 1.34 compiled at Dec 21 2009 19:48:23
> > > Create movies and tif, rgb, jpeg, png, or w files using a precomputed
> inverse operator decomposition
> > >
> > > stc input file : var
> > > mov file output : test.mov
> > > width x height : 600 x 400
> > > QuickTime quality : 80
> > > The input stc file will be assumed to contain current expectation
> value data
> > > Subject : 001_S1
> > > Visualization surface : inflated
> > > Process both hemispheres
> > > Magnification factor : 1.00
> > > Thresholding:
> > > fthresh : 8.00
> > > fmid : 15.00
> > > fslope : 0.20
> > > fmax : 20.00
> > >
> > > -------------------------------------------------------------------
> > >
> > > 600 x 400 off-screen rendering initialized.
> > > Selected view called &#39;lat&#39;
> > >
> > > -------------------------------------------------------------------
> > >
> > > No vertices in stc file var-lh.stc
> > >
> > >
> > >
> > >
> > > On 10/02/14, Eric Larson wrote:
> > > > If you&#39;re comfortable with Python, then PySurfer will allow you
> to directly plot arbitrary data vectors on the cortical surface. Should be
> pretty easy for your use case.
> > > >
> > > > If you want to stick with Bash, then you can get the STC format spec
> from looking at the mne-python code for `SourceEstimate.save`, which calls
> `_write_stc`:
> > > >
> > > >
> > > >
> https://github.com/mne-tools/mne-python/blob/master/mne/source_estimate.py#L72
> > > >
> > > >
> > > >
> > > > I don&#39;t think you need to supply the `--inv`, `--meas`, or
> `--set` parameters to `mne_make_movie` if you provide `--stcin` (since
> those other parameters are basically used to create a STC in memory).
> You&#39;ll probably also need to specify the `--subject` and the output
> type (e.g. `--mov`). The following command works on my system:
> > > >
> > > >
> > > > mne_make_movie --stcin test-fsaverage-lh.stc --mov test.mov
> --subject fsaverage
> > > >
> > > >
> > > >
> > > > Eric
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, Oct 2, 2014 at 2:21 PM, Gregory Kirk <
> Mne_analysis at nmr.mgh.harvard.edu(javascript:main.compose() <gkirk at wisc.edu(javascript:main.compose()&#39;)"
> target="1">gkirk at wisc.edu(javascript:main.compose()> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > i recently posted to free surfer list and was invited to post to
> this list as it seems the men may be the best way
> > > > > for me to accomplish my task.
> > > > >
> > > > >
> > > > > I want to make movies of a spatio-temporal evolution of a quantity
> across the cortical surface, not reg/meg.
> > > > >
> > > > >
> > > > > i want to do it at the full resolution of the vertices on the
> surface, so about 300000+ for both hemispheres,there
> > > > > would be 200-300 time points, so my input would
> > > > > be a matrix 300000*300.
> > > > >
> > > > >
> > > > > so looking a bit at the manual for men_make_movie ( i have used
> men before for reg solutions and displayed then on the cortical
> > > > > surface succesfully ). would i use the --stcin option ? I would
> need to know the format for the stc files and skip,
> > > > > --meas,--inv,--set would i need to fake these operators and input
> some version
> > > > > of identity matrices ?
> > > > >
> > > > >
> > > > > the threshold and such obvious parameters i remember
> > > > >
> > > > >
> > > > > can ya help me skin this cat ?
> > > > >
> > > > >
> > > > > g
> > > > > _______________________________________________
> > > > > Mne_analysis mailing list
> > > > >
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis(java_script:main.compose(&#39;new&#39;,
> &#39;t=Mne_analysis at nmr.mgh.harvard.edu(javascript:main.compose()>
> > > > > <a href=)
> > > > >
> > > > >
> > > > > 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(javascript:main.compose()
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> > >
> > >
> > >
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141005/0eec2aec/attachment.html 


More information about the Mne_analysis mailing list