bworoch | 1 Nov 21:37
Picon

Re: batch save


Matthew,
I saved the variable E into a .mat file for each subject, but was unable to
then open those files using the results menu/Set results from file.  I need
a line of code at the end of my loop that will mimic the action of results
menu/Save results to file, so that I am able to then use the other results
menu options such as FIR time course, % signal change, etc.
Thanks in advance,
Brion

Matthew Brett wrote:
> 
> Hi,
> 
> On 10/31/07, bworoch <bworoch2 <at> uiuc.edu> wrote:
>>
>> I want to run the batch script from the faq for multiple subjects.  What
>> is
>> the code to save the estimated results at the end for future use?
> 
> What do you want to save?  If the estimated design itself, put the
> batch script into a loop over subjects
> 
> n_subjects = length(subjects);
> subjects_estimated = cell(n_subjects)
> for subject_no = 1:n_subjects
> ...
> subjects_estimated(subject_no) = E;
> end
> 
(Continue reading)

Matthew Brett | 3 Nov 13:54
Picon
Gravatar

Re: a question on FIR model/Marsbar, 'singel' or 'stacked'

Hi,

> My concern is that I chose 'single' but not 'stacked'.
> Are the plots for the conditions A to E valid?
> The results with 'single' model seemed quite nice for me.
> The difference in the duration of the trial (6 s for A to E, 9 s for qA to qE)
> was present, that is, the conditions qA to qF had longer activation.
> In addition, the height of the signal increase (represented in %) seemed reasonable.
>
> I also plotted with the 'stacked' model, but it looked not so good,
> even less informative than the plots which merely averaged the all trials without removing
> the overlap of other conditions.

Sorry to be so slow to reply, I'm afraid I've been very busy.

You probably saw that I put some documentation in the marsbar code to
describe the difference between single and stacked - which is a
moderately hard one to understand:

http://marsbar.sourceforge.net/doc-devel/latest/marsbar/ <at> mardo/event_fitted_fir.html

Basically, single gives you an estimate for the signal for the whole
event, and stacked gives you an estimate for the signal per time
point. So, if you want to look at the the signal for a 6 second event,
and you are happy to compare that directly to the signal for a 9
second event (even though they will be different due to different
durations), then you are right to chose single rather than stacked.

Best,

(Continue reading)

Matthew Brett | 3 Nov 13:58
Picon
Gravatar

Re: extracting FIR timecourses

Hi,

> I am trying to extract FIR timecourses in a study that uses a sparse-imaging
> design with a TR=10.2s. The first 8.6s of the TR are a silent period (during
> which a spoken sentence was presented) and the last 1.6s correspond to the scan
> acquisition. Is it possible to extract timecourses in a sparse-imaging
> design with such TR?

Well, yes, but of course you can only get an estimate every 10
seconds, and you'll have to interpret the values accordingly...

> When I try the script in
> http://marsbar.sourceforge.net/faq.html#extract_fir
>
> I get the following error message:
>
> ??? Error using ==> event_fitted_fir
> Too many input arguments.
>
> Error in ==> /work/imaging/Functional/KTB/ffx/marsbar_batch.m
> On line 95 ==>   fir_tc(:, e_s) = event_fitted_fir(E, e_specs(:,e_s), bin_size,

Hmm - did you in fact somehow pass too many inputs?  The documentation is here:

http://marsbar.sourceforge.net/doc-devel/latest/marsbar/ <at> mardo/event_fitted_fir.html

The code in the FAQ looks OK to me - but maybe I missed something...

Matthew

(Continue reading)

Matthew Brett | 3 Nov 14:02
Picon
Gravatar

Re: Probelms with compute_contrasts() ?

Hi,

Sorry to be slow to reply, only slowly catching up with my email.

>     I'm trying to model an ROI using a batch script (adapted from the
> code provided in the marsbar FAQ).  It works without a hitch (using
> marsbar-devel in matlab 7.0.4), but I don't understand the output of
> compute_contrasts(), specifically MVres (please see below).

It sounds as if what you actually want is one of the event fitted
response routines rather than the MVres stuff, which is rather
obscure.  Did you find the FAQ entries on this?:

http://marsbar.sourceforge.net/faq.html#extract_fir

Matthew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Christian Beste | 6 Nov 12:16
Picon
Favicon

exporting intensity values


Dear all,

I am new in using MarsBaR and I'm interesting in exporting intensities of ROIs for further statistical
analysis. When I choose the option MarsBaR SPM graph and then the option "contrast estimates and 90% C.I" I
would like to export this value in a file, which is readable for Excel for further analysis.
Does anybody know how, if this is possible and how?

Thank you very much in advance.
Christian

--

-- 
http://www.westropolis.de -  Kultur fuer alle, Kritik von allen. Die Plattform fuer Kultur im Web. 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Swann Pichon | 6 Nov 14:29
Picon

Code to extract data from a single voxel

Dear Matthew & MB users, 
The following code has been written with the help of the Marsbar tutorial. 
Although it works fine with ROI files, I am not sure that the way I use 
it to get stat for a single coord is correct. 
The T/F values that I get are quite different from SPM's ones. 
I am just beginning to use MB functions, there might be some evident 
stuff that I am still missing.. 
Thanks for your indulgence, 
Swann 

 
ANALYSIS_dir =  'I:\Data XP\FMRI BEE4\Analyse HRF - scaling slicetiming';
ANALYSIS_SRC_C = {'S1','S2'};

% ROI = {'I:\Data XP\fMRI BEE4\Analyse HRF - scaling 
slicetiming\Roi_mask\points_coordinate_mm_-58_26_12_roi.mat'};
ROI = {[-58 26 12]};    % MNI coords
UNIT = 'mm'; % coordinates are in voxel space 'vox' or mm space 'mm'
SUMFUNC = 'mean';   % one of 'mean', 'median', 'eigen1', 'wtmean'  to 
summarize data in the ROIs

res = [];
for roi_file_no=1:length(ROI)
    resStat = [];
    roi_file = ROI{roi_file_no};

    for analysis_no=1:length(ANALYSIS_SRC_C)
        work_dirs{analysis_no} = [ANALYSIS_dir filesep 
ANALYSIS_SRC_C{analysis_no}];

(Continue reading)

Luke | 8 Nov 15:23
Picon

% signal change for 2 X 2 random effects design

I am comparing two groups on a contrast of condition A - condition B. I would
like to include % signal change as a sort-of measure of effect size for the
significant activations resulting from this comparison. Is there a better way of
doing this other than setting the design for each subject, extracting each ROI
for each subject, specifying the conditions for each subject, entering the %
signal change results into SPSS or some such software and running a traditional
statistical analysis?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
jayhegde | 11 Nov 03:53
Picon

How to *write to* an image file at a given ROI?


Hi Matthew and other MarsBaR experts,

     Matthew's script examples make it very clear how to extract, or read,
the raw image values at a given ROI.

     But could someone please tell me how to *write* to a given ROI in the
image?

     For instance, to read the image data, I could do something like 
              [Y, multv, vXYZ, mat] = getdata(my_roi, my_data_img);
     where Y would be the raw image values.

     But can one do the reverse, i.e., write specified values (e.g., %
response change values) to the voxels corresponding to 'my_roi' in
'my_data_img'?  In other words, I need to write a 'putdata' version of the
'getdata' function.  (I need to do this because I'm trying to create a
composite nifti image file where each ROI contains % response changes of
that ROI.)

     I know this should be a simple matter of mapping the image coordinates
to the marsbar coordinates (and vice versa), but I'm having no success at
all with functions like mars_space().

    Any help would be greatly appreciated.
    Thank you very much,
    Jay

--

-- 
View this message in context: http://www.nabble.com/How-to-*write-to*-an-image-file-at-a-given-ROI--tf4784583.html#a13687927
(Continue reading)

Matthew Brett | 14 Nov 16:12
Picon
Gravatar

Re: How to *write to* an image file at a given ROI?

Hi,

>      But could someone please tell me how to *write* to a given ROI in the
> image?
>
>      For instance, to read the image data, I could do something like
>               [Y, multv, vXYZ, mat] = getdata(my_roi, my_data_img);
>      where Y would be the raw image values.
>
>      But can one do the reverse, i.e., write specified values (e.g., %
> response change values) to the voxels corresponding to 'my_roi' in
> 'my_data_img'?

I guess that would be fairly simple, in a script.  Like:

[Y, multv, vXYZ, mat] = getdata(my_roi, my_data_img);
V = my_data_img;
V.fname = 'another_image.img';
dims = V.dim(1:3);
img_vals = zeros(dims);
elements =  elements = vXYZ(1,:) + (vXYZ(2,:)-1) * dims(1) +
(vXYZ(3,:)-1) * dims(1)*dims(2);
img_vals(elements) = Y;
...
spm_write_vol(V, img_vals);

Matthew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
(Continue reading)

Luke | 14 Nov 20:09
Picon

Importing SPM VOI.mat file into MarsBar to use for % signal change

How might I import a VOI.mat file that was created from an activation map in
SPM5 into MarsBar to use in a % signal change analysis?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Gmane