[Mne_analysis] make non reg/meg movie

Matti Hamalainen msh at nmr.mgh.harvard.edu
Mon Oct 6 00:29:15 EDT 2014
Search archives:

The color scale is made in the FreeSurfer way but there is no particular association with p values. With the mne_make_movie just takes the data from stc files as they are. Without the --spm option is missing, the scale values are multiplied by 10^(-10), with it not. - Matti

On Oct 6, 2014, at 7:07 AM, Gregory Kirk <gkirk at wisc.edu> wrote:

> 
> when i said it's maybe expecting p values, i meant -log10(p) the freesurfer way ?
> g
> 
> On 10/05/14, Matti Hamalainen  wrote:
>> 
>> 
>> 
>> 
>> 
>> Greg, 
>> 
>> When you use --spm option the --fmin, --fmid, and --fmax values are used directly without any multiplier. Use --fmax instead of --fslope, which is provided for backwards compatibility only. - Matti
>> 
>> On Oct 6, 2014, at 3:04 AM, Eric Larson <larson.eric.d at gmail.com <larson.eric.d at gmail.com>> wrote:
>> 
>> 
>>> 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 <gkirk at wisc.edu')" target="1">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 <https://github.com/mne-tools/mne-python/blob/master/mne/source_estimate.py#L72(javascript:main.compose('new', 't=gkirk at wisc.edu>(java_script: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`:
>>>>>>> 
>>>>>>> 
>>>>>>>>>> On Thu, Oct 2, 2014 at 2:21 PM, Gregory Kirk <Mne_analysis at nmr.mgh.harvard.edu <Mne_analysis at nmr.mgh.harvard.edu>(java_script:main.compose() <gkirk at wisc.edu <gkirk at wisc.edu>(java_script:main.compose()&#39;)" target="1">gkirk at wisc.edu <gkirk at wisc.edu>(java_script: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 <Mne_analysis at nmr.mgh.harvard.edu>(java_script: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 <Mne_analysis at nmr.mgh.harvard.edu>(java_script:main.compose()
>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>> 
>>>>>> 
>>>>>> 
>>>> _______________________________________________
>>>> Mne_analysis mailing list
>>>> Mne_analysis at nmr.mgh.harvard.edu <Mne_analysis at nmr.mgh.harvard.edu>
>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Mne_analysis mailing list
>>> Mne_analysis at nmr.mgh.harvard.edu <Mne_analysis at nmr.mgh.harvard.edu>
>>> 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
> 
> 





More information about the Mne_analysis mailing list