Re: [Freesurfer] multi-slice timing correction

2019-06-11 Thread Joseph Dien
External Email - Use Caution

Okay, I looked through the source code itself and I think I worked it out.

preproc-sess calls on stc-sess, passing it both the sdf and the ngroups flags.
stc-sess calls on stc.fsl, passing it both the sdf and the ngroups flags.
stc.fsl calls on slicetimer.  It uses the sdf flag if it has been set to a file 
name, otherwise it uses the other flags including ngroups to call on slicedelay 
to generate an sdf file which it then passes on to slicetimer.

So in other words, if an sdf file is provided, then the ngroups flag is ignored 
and does not need to be set.

Am I correct?  I’d like to make sure I’m doing this right.

Thanks again for this amazing toolset!

Joe

> On Jun 11, 2019, at 15:55, Joseph Dien  wrote:
> 
> External Email - Use Caution
> 
> 
> looking further into the archives, I see that the -sdf flag can be used.  I’m 
> still uncertain about the -ngroups flag.  I see at least a couple other users 
> have asked about this but I don’t see a response.  In the present case, if 
> there are 60 slices and they are accelerated by a factor of 6, does one 
> specify -ngroups 6 or -ngroups 10?
> 
> Joe
> 
>> On Jun 2, 2019, at 19:46, Joseph Dien > <mailto:jdie...@mac.com>> wrote:
>> 
>> External Email - Use Caution
>> 
>> 
>> Hi Doug,
>>I’m happy to see that FreeSurfer6 provides enhanced support for slice 
>> timing.  I’m trying to run it on some multi-slice data.  May I ask you for 
>> some guidance on how to use the new preproc-sess options?  As I understand 
>> it, I would specify “-ngroups 10” because the data were collected in ten 
>> groups of six slices at a time?  I’m not sure how to specify “-sliceorder”.  
>> Slice times are below.  Thanks for any help you can provide.
>> 
>> Joe
>> 
>> 0
>> 877.5000
>> 502.5000
>> 125
>> 1005
>> 627.5000
>> 252.5000
>> 1130
>> 752.5000
>> 377.5000
>> 0
>> 877.5000
>> 502.5000
>> 125
>> 1005
>> 627.5000
>> 252.5000
>> 1130
>> 752.5000
>> 377.5000
>> 0
>> 877.5000
>> 502.5000
>> 125
>> 1005
>> 627.5000
>> 252.5000
>> 1130
>> 752.5000
>> 377.5000
>> 0
>> 877.5000
>> 502.5000
>> 125
>> 1005
>> 627.5000
>> 252.5000
>> 1130
>> 752.5000
>> 377.5000
>> 0
>> 877.5000
>> 502.5000
>> 125
>> 1005
>> 627.5000
>> 252.5000
>> 1130
>> 752.5000
>> 377.5000
>> 0
>> 877.5000
>> 502.5000
>> 125
>> 1005
>> 627.5000
>> 252.5000
>> 1130
>> 752.5000
>> 377.5000
>> 
>> 
>> 
>> Joseph Dien, PhD
>> Senior Research Scientist
>> Department of Human Development and Quantitative Methodology
>> University of Maryland, College Park
>> http://joedien.com <http://joedien.com/>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 
> 
> Joseph Dien, PhD
> Senior Research Scientist
> Department of Human Development and Quantitative Methodology
> University of Maryland, College Park
> http://joedien.com <http://joedien.com/>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



Joseph Dien, PhD
Senior Research Scientist
Department of Human Development and Quantitative Methodology
University of Maryland, College Park
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] multi-slice timing correction

2019-06-11 Thread Joseph Dien
External Email - Use Caution

looking further into the archives, I see that the -sdf flag can be used.  I’m 
still uncertain about the -ngroups flag.  I see at least a couple other users 
have asked about this but I don’t see a response.  In the present case, if 
there are 60 slices and they are accelerated by a factor of 6, does one specify 
-ngroups 6 or -ngroups 10?

Joe

> On Jun 2, 2019, at 19:46, Joseph Dien  wrote:
> 
> External Email - Use Caution
> 
> 
> Hi Doug,
>I’m happy to see that FreeSurfer6 provides enhanced support for slice 
> timing.  I’m trying to run it on some multi-slice data.  May I ask you for 
> some guidance on how to use the new preproc-sess options?  As I understand 
> it, I would specify “-ngroups 10” because the data were collected in ten 
> groups of six slices at a time?  I’m not sure how to specify “-sliceorder”.  
> Slice times are below.  Thanks for any help you can provide.
> 
> Joe
> 
> 0
> 877.5000
> 502.5000
> 125
> 1005
> 627.5000
> 252.5000
> 1130
> 752.5000
> 377.5000
> 0
> 877.5000
> 502.5000
> 125
> 1005
> 627.5000
> 252.5000
> 1130
> 752.5000
> 377.5000
> 0
> 877.5000
> 502.5000
> 125
> 1005
> 627.5000
> 252.5000
> 1130
> 752.5000
> 377.5000
> 0
> 877.5000
> 502.5000
> 125
> 1005
> 627.5000
> 252.5000
> 1130
> 752.5000
> 377.5000
> 0
> 877.5000
> 502.5000
> 125
> 1005
> 627.5000
> 252.5000
> 1130
> 752.5000
> 377.5000
> 0
> 877.5000
> 502.5000
> 125
> 1005
> 627.5000
> 252.5000
> 1130
> 752.5000
> 377.5000
> 
> 
> 
> Joseph Dien, PhD
> Senior Research Scientist
> Department of Human Development and Quantitative Methodology
> University of Maryland, College Park
> http://joedien.com <http://joedien.com/>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



Joseph Dien, PhD
Senior Research Scientist
Department of Human Development and Quantitative Methodology
University of Maryland, College Park
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Freesurfer V6 installation: ubuntu virtual machine

2019-06-03 Thread Joseph Dien
External Email - Use Caution

I have successfully run freesurfer 6.0 recon-all under Ubuntu in the OS X 
Parallels VM, as a workaround for the OS X recon-all CachedArray.cc 
<http://cachedarray.cc/> crash bug.

Joe

> On May 31, 2019, at 18:39, fsbuild  wrote:
> 
> External Email - Use Caution
> 
> 
> Hello Steve,
> 
> We have run the freesurfer 6.0.0 release on Ubuntu 16 and 18 which should 
> also work in a VM.
> 
> You may have to install some packages in order to run freesurfer, especially 
> for the freeview program which uses various graphics packages, etc.  After 
> downloading the freesurfer 6.0.0 binaries from,
> 
> https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
>  
> <https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz>
> 
> - I would first try to run the freeview binary as that is a good test to help 
> determine what packages may be missing.
> 
> I needed to both build and run freesurfer on Ubuntu, so I will list below the 
> packages I installed for both purposes.  You should not need for example the 
> gcc compiler packages just to run the 6.0.0 release binaries, but I have not 
> tried to identify a set of packages to only run the binaries.
> 
> You will likely also need sudo privileges to install packages.
> 
> - R.
> 
>  $ sudo apt-get install build-essential
>  $ sudo apt-get install libgl1-mesa-dev freeglut3-dev mesa-common-dev
>  $ sudo apt-get install libblas-dev liblapack-dev
>  $ sudo apt-get install ocl-icd-opencl-dev
>  $ sudo apt-get install libxmu-dev libxi-dev
>  $ sudo apt-get install libopencv-dev 
> 
>  Ubuntu 16:  $ sudo apt-get install gcc-4.9 g++-4.9 gfortran-4.9
>  Ubuntu 18:  $ sudo apt-get install gcc-4.8 g++-4.8 gfortran-4.8
> 
>  $ sudo apt-get install xorg xorg-dev libx11-dev
>  $ sudo apt-get install tcl tcl-dev tk tk-dev
>  $ sudo apt-get install qt5-default qtcreator
>  $ sudo apt-get install libqt5x11extras5-dev
>  $ sudo apt-get install git-annex 
>  $ sudo apt-get install python3-dev
> 
> … you will need a libpng, which I got from the archives,
> 
> 
> http://se.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
>  
> <http://se.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb>
> 
> $ curl -O  
> http://se.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
> 
>- then install the gdebi tool, 
> 
> $ sudo  apt install gdebi
> 
> - change directories to where you downloaded the libpng12 package, and 
> use gdebi to install it,
> 
> $ sudo  gdebi  libpng12-0_1.2.54-1ubuntu1_amd64.deb
> 
> 
> 
>> On May 31, 2019, at 02:57, Steve Petersen  wrote:
>> 
>> External Email - Use Caution
>> 
>> 
>> Dear Freesurfer experts, 
>> 
>> 
>> Just a simple question, is possible to install the Freesurfer (Version 6) in 
>> a virtual machine of ubuntu?
>> 
>> Thanks in advance,
>> 
>> 
>> Best regards,
>> 
>> Steve
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



Joseph Dien, PhD
Senior Research Scientist
Department of Human Development and Quantitative Methodology
University of Maryland, College Park
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] multi-slice timing correction

2019-06-02 Thread Joseph Dien
External Email - Use Caution

Hi Doug,
   I’m happy to see that FreeSurfer6 provides enhanced support for slice 
timing.  I’m trying to run it on some multi-slice data.  May I ask you for some 
guidance on how to use the new preproc-sess options?  As I understand it, I 
would specify “-ngroups 10” because the data were collected in ten groups of 
six slices at a time?  I’m not sure how to specify “-sliceorder”.  Slice times 
are below.  Thanks for any help you can provide.

Joe

0
877.5000
502.5000
125
1005
627.5000
252.5000
1130
752.5000
377.5000
0
877.5000
502.5000
125
1005
627.5000
252.5000
1130
752.5000
377.5000
0
877.5000
502.5000
125
1005
627.5000
252.5000
1130
752.5000
377.5000
0
877.5000
502.5000
125
1005
627.5000
252.5000
1130
752.5000
377.5000
0
877.5000
502.5000
125
1005
627.5000
252.5000
1130
752.5000
377.5000
0
877.5000
502.5000
125
1005
627.5000
252.5000
1130
752.5000
377.5000



Joseph Dien, PhD
Senior Research Scientist
Department of Human Development and Quantitative Methodology
University of Maryland, College Park
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] request for corrected p-values for mni305 space

2016-05-25 Thread Joseph Dien
Hi,
   just a user request for corrected p-values for the mni305 space analyses 
(i.e., sig.voxel.nii.gz files).

Thanks!

Joe



Joseph Dien, PhD
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland, College Park
E-mail: jdie...@mac.com
Cell Phone: 202-297-8117
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] mkanalysis-sess stimulusdelay parameter

2016-04-19 Thread Joseph Dien
I’m taking a look at the effects of stimulus delay settings in one of my 
datasets so I was surprised to notice that the default setting of 
mkanalysis-sess is a delay of -TR/2 seconds.  What is the reasoning for this?  
If, as I expect, it was just empirically found that it worked better than 
without, my question is whether this decision was made on the basis of all the 
event-related options or just some subset of them?  I’m worried that this might 
be an optimization that isn’t appropriate for my particular parameter choices 
(FS 5.3, spmhrf0).  Any comments would be appreciated.

Cheers!

Joe




Joseph Dien, PhD
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland, College Park
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] ERROR running mkcontrast

2016-03-31 Thread Joseph Dien
Hi, I ran into an odd problem which I was able to fix but wanted to let others 
know about.
This is OS X 10.11.4 with Matlab 2016a and FreeSurfer 5.3.

I got the following error when I ran mkcontrast using batch files that 
previously worked fine:

/private/var/folders/wt/vj5q34fs20x50sh_6rcrtkn8gn/T/Cleanup At 
Startup/sh.h4SI0w: No such file or directory.
ERROR running mkcontrast

Looking into the directories in question, I found that while there was no 
directory named 'Cleanup At Startup’ inside the T directory, there was such a 
directory inside ‘vj5q34fs20x50sh_6rcrtkn8gn’.  I’m guessing some version 
update changed the location of this directory.  I went into T and performed the 
following command:

mkdir 'Cleanup At Startup'

after doing so, everything worked again.

Cheers!

Joe



Joseph Dien, PhD
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland, College Park
E-mail: jdie...@mac.com
Cell Phone: 202-297-8117
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2016-03-24 Thread Joseph Dien
Doug, I see now what your concern was with just adjusting the beta weights.  
Since FSFAST is using a pseudo-mixed effects model, there is also a need to 
pass the cesvar statistics up to the second level.  How that might accommodate 
the derivative boost computation is not straightforward to me.  I need to 
understand better what fsfast is doing.  I was wondering if you could answer a 
couple questions about how cesvar is computed;

1) The cesvar computations in the fast_fratio.m function provided a good guide. 
 According to it:
cescvm = inv(C*inv(X'*X)*X'*Sn*X*inv(X'*X)*C’);
where Sn is the covariance matrix of the noise after the whitening (which is on 
by default).
cesvar=rvar./cescvm.

How is Sn computed?

2) I need to understand what fsfast is doing conceptually but I couldn’t 
reconcile the Thirion et al (2007) Equation #5 and the equations above, 
specifically the inclusion of the rvar term.  Can you throw some light on this?

I greatly appreciate your helpful tips and this amazing software that you have 
written.

Respectfully,

Joe


> On Mar 17, 2016, at 15:48, Joseph Dien <jdie...@mac.com> wrote:
> 
> I did more digging around and came up with a procedure.  Please let me know 
> if it would cause any problems.
> Looking at the contents of the X.mat files (which contain the predictors), it 
> appears that the betas are indeed arranged as c1 d1 c2 d2…
> I also found that isxconcat-sess requires the contrast output of 
> mkcontrast-sess so I can’t just bypass it.
> 
> So my thought is:
> 
> 1) run mkanalysis-sess with -spmhrf 1
> 2) run selxavg3-sess with the -no-con-ok flag to get the spmhrf1 betas 
> without bothering with the contrasts
> 3) run mkanalysis-sess with -spmhrf 0
> 4) run selxavg3-sess again but with the contrasts to get everything set up
> 5) read in the spmhrf1 betas with MRIread and compute the Calhoun derivative 
> boost with the beta values in mri.vol
> 6) use these values to compute the desired contrasts.  From my examination of 
> a sample ces.nii.gz file, a simple linear combination based on the contrast 
> weights is all that is needed.
> 7) replace the contents of the corresponding spmhrf0 ces.nii.gz files’ 
> mri.vol with these new values
> 8) write out the new ces.nii.gz files.
> 9) proceed with the analysis stream, using isxconcat-sess to set up the 
> second level analysis
> 
> So the question is, would this work?  Am I neglecting files other than 
> ces.nii.gz that would need to be modified?  or other fields in the mri data 
> structure?
> When you referred to writing “out a new volume” is this what you meant?
> 
> Thanks again for this help!
> 
> Joe
> 
> 
>> On Mar 15, 2016, at 17:32, Joseph Dien <jdie...@mac.com 
>> <mailto:jdie...@mac.com>> wrote:
>> 
>> oh duh!  Sorry, wasn’t thinking clearly.
>> Okay, I see how to generate the betas now.  I don’t even need to mess with 
>> the mkcontrast-sess command.
>> I just run selxavg3-sess with the -no-con-ok flag.
>> With spmhrf 0 I generated a beta.nii.gz file with 85 betas in each vertex.
>> With spmhrf 1 I generated a beta.nii.gz file with 97 betas in each vertex.
>> With 12 conditions, 12 more betas is exactly right.
>> So how do I know which of the betas is which?
>> I looked through the files and couldn’t find any labels.
>> I’m guessing the first twelve are the condition betas for "spmhrf 0".
>> If so, for "spmhrf 1", is it arranged as:
>> 
>> 1) c1 c2 c3…d1 d2 d3...
>> 
>> or
>> 
>> 2) c1 d1 c2 d2...
>> 
>>  (where d is the first derivative term)
>> 
>> also, when I asked you earlier about implementing this procedure, I had 
>> suggested reading the betas, computing the Calhoun, then generating new 
>> beta.nii.gz files with the new betas replacing the original spmhrf0 betas 
>> and then continuing with the regular analysis stream but you said it would 
>> result in invalid p-values.  Instead, you suggested:
>> 
>> "I was just thinking you could load the beta into matlab, make the
>> Calhoun computations on each condition, then compute the contrasts, then
>> write out the new volume”
>> 
>> can you expand on how one might “compute the contrasts” and “write out the 
>> new volume”?
>> 
>> Thanks again for this help!
>> 
>> Joe
>> 
>> 
>>> On Mar 15, 2016, at 12:43, Douglas N Greve <gr...@nmr.mgh.harvard.edu 
>>> <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>> 
>>> The setwdelay is an option for mkcontrast-sess (not mkanalysis-sess)
>>> 
>>> On 03/13/2016 10:29 PM, Joseph Dien wrote:
>>>> After a long break, back to this…
>>>&g

Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2016-03-19 Thread Joseph Dien
I did more digging around and came up with a procedure.  Please let me know if 
it would cause any problems.
Looking at the contents of the X.mat files (which contain the predictors), it 
appears that the betas are indeed arranged as c1 d1 c2 d2…
I also found that isxconcat-sess requires the contrast output of 
mkcontrast-sess so I can’t just bypass it.

So my thought is:

1) run mkanalysis-sess with -spmhrf 1
2) run selxavg3-sess with the -no-con-ok flag to get the spmhrf1 betas without 
bothering with the contrasts
3) run mkanalysis-sess with -spmhrf 0
4) run selxavg3-sess again but with the contrasts to get everything set up
5) read in the spmhrf1 betas with MRIread and compute the Calhoun derivative 
boost with the beta values in mri.vol
6) use these values to compute the desired contrasts.  From my examination of a 
sample ces.nii.gz file, a simple linear combination based on the contrast 
weights is all that is needed.
7) replace the contents of the corresponding spmhrf0 ces.nii.gz files’ mri.vol 
with these new values
8) write out the new ces.nii.gz files.
9) proceed with the analysis stream, using isxconcat-sess to set up the second 
level analysis

So the question is, would this work?  Am I neglecting files other than 
ces.nii.gz that would need to be modified?  or other fields in the mri data 
structure?
When you referred to writing “out a new volume” is this what you meant?

Thanks again for this help!

Joe


> On Mar 15, 2016, at 17:32, Joseph Dien <jdie...@mac.com> wrote:
> 
> oh duh!  Sorry, wasn’t thinking clearly.
> Okay, I see how to generate the betas now.  I don’t even need to mess with 
> the mkcontrast-sess command.
> I just run selxavg3-sess with the -no-con-ok flag.
> With spmhrf 0 I generated a beta.nii.gz file with 85 betas in each vertex.
> With spmhrf 1 I generated a beta.nii.gz file with 97 betas in each vertex.
> With 12 conditions, 12 more betas is exactly right.
> So how do I know which of the betas is which?
> I looked through the files and couldn’t find any labels.
> I’m guessing the first twelve are the condition betas for "spmhrf 0".
> If so, for "spmhrf 1", is it arranged as:
> 
> 1) c1 c2 c3…d1 d2 d3...
> 
> or
> 
> 2) c1 d1 c2 d2...
> 
>  (where d is the first derivative term)
> 
> also, when I asked you earlier about implementing this procedure, I had 
> suggested reading the betas, computing the Calhoun, then generating new 
> beta.nii.gz files with the new betas replacing the original spmhrf0 betas and 
> then continuing with the regular analysis stream but you said it would result 
> in invalid p-values.  Instead, you suggested:
> 
> "I was just thinking you could load the beta into matlab, make the
> Calhoun computations on each condition, then compute the contrasts, then
> write out the new volume”
> 
> can you expand on how one might “compute the contrasts” and “write out the 
> new volume”?
> 
> Thanks again for this help!
> 
> Joe
> 
> 
>> On Mar 15, 2016, at 12:43, Douglas N Greve <gr...@nmr.mgh.harvard.edu 
>> <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>> 
>> The setwdelay is an option for mkcontrast-sess (not mkanalysis-sess)
>> 
>> On 03/13/2016 10:29 PM, Joseph Dien wrote:
>>> After a long break, back to this…
>>> 
>>> My goal is still to get the betas for the first and maybe second spm 
>>> hrf so I can calculate a Calhoun derivative boost measure.
>>> 
>>> As a first step I ran:
>>> 
>>> mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh 
>>> -fwhm 5 -event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 
>>> 1 -TR 2 -refeventdur .25 -polyfit 2 -per-run -force -nuisreg 
>>> nuisreg.dat 6 -tpexclude tpexclude.dat -b0dc
>>> 
>>> to use the SPM HRF with one derivative.
>>> 
>>> Then:
>>> 
>>> selxavg3-sess -sf sessidlistALL.dat -analysis RPA.sm05.lh
>>> 
>>> I got the following error:
>>> 
>>> ERROR: flac_evconw(): conVinc, Condition01 evrw dim mismatch
>>> This condition has 2 regressors, but evrm has 1
>>> Struct contents reference from a non-struct array object.
>>> 
>>> Error in flac_conmat (line 37)
>>> if(nthcon > length(flac.con))
>>> 
>>> Error in flac_customize (line 369)
>>>  flacnew = flac_conmat(flacnew,nthcon);
>>> 
>>> Error in fast_selxavg3 (line 65)
>>> flac0 = flac_customize(flac0);
>>> 
>>>>> --
>>> ERROR: fast_selxavg3() failed\n
>>> 
>>> This ran fine with spmhrf 0
>>> 
>>> based on your prior response below that:
>>

Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2016-03-15 Thread Joseph Dien
oh duh!  Sorry, wasn’t thinking clearly.
Okay, I see how to generate the betas now.  I don’t even need to mess with the 
mkcontrast-sess command.
I just run selxavg3-sess with the -no-con-ok flag.
With spmhrf 0 I generated a beta.nii.gz file with 85 betas in each vertex.
With spmhrf 1 I generated a beta.nii.gz file with 97 betas in each vertex.
With 12 conditions, 12 more betas is exactly right.
So how do I know which of the betas is which?
I looked through the files and couldn’t find any labels.
I’m guessing the first twelve are the condition betas for "spmhrf 0".
If so, for "spmhrf 1", is it arranged as:

1) c1 c2 c3…d1 d2 d3...

or

2) c1 d1 c2 d2...

 (where d is the first derivative term)

also, when I asked you earlier about implementing this procedure, I had 
suggested reading the betas, computing the Calhoun, then generating new 
beta.nii.gz files with the new betas replacing the original spmhrf0 betas and 
then continuing with the regular analysis stream but you said it would result 
in invalid p-values.  Instead, you suggested:

"I was just thinking you could load the beta into matlab, make the
Calhoun computations on each condition, then compute the contrasts, then
write out the new volume”

can you expand on how one might “compute the contrasts” and “write out the new 
volume”?

Thanks again for this help!

Joe


> On Mar 15, 2016, at 12:43, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote:
> 
> The setwdelay is an option for mkcontrast-sess (not mkanalysis-sess)
> 
> On 03/13/2016 10:29 PM, Joseph Dien wrote:
>> After a long break, back to this…
>> 
>> My goal is still to get the betas for the first and maybe second spm 
>> hrf so I can calculate a Calhoun derivative boost measure.
>> 
>> As a first step I ran:
>> 
>> mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh 
>> -fwhm 5 -event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 
>> 1 -TR 2 -refeventdur .25 -polyfit 2 -per-run -force -nuisreg 
>> nuisreg.dat 6 -tpexclude tpexclude.dat -b0dc
>> 
>> to use the SPM HRF with one derivative.
>> 
>> Then:
>> 
>> selxavg3-sess -sf sessidlistALL.dat -analysis RPA.sm05.lh
>> 
>> I got the following error:
>> 
>> ERROR: flac_evconw(): conVinc, Condition01 evrw dim mismatch
>> This condition has 2 regressors, but evrm has 1
>> Struct contents reference from a non-struct array object.
>> 
>> Error in flac_conmat (line 37)
>> if(nthcon > length(flac.con))
>> 
>> Error in flac_customize (line 369)
>>  flacnew = flac_conmat(flacnew,nthcon);
>> 
>> Error in fast_selxavg3 (line 65)
>> flac0 = flac_customize(flac0);
>> 
>>>> --
>> ERROR: fast_selxavg3() failed\n
>> 
>> This ran fine with spmhrf 0
>> 
>> based on your prior response below that:
>> 
>> "This is what happens. If you want to use the derivatives,
>> then you need to spec -setwdelay. When you run the command, it will 
>> prompt you
>> for 3 values to use. If you spec 1 0 0, then it will be the same as the
>> default. If you want to test only the first derivative, then 
>> you would spec 0 1 0. Note that the 3rd regressor is the 2nd 
>> derivative wrt time, not the first derivative wrt the dispersion 
>> parameter. You
>> cannot get the Calhoun 2004 value using a contrast (it is non-linear).”
>> 
>> I tried:
>> 
>> mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh 
>> -fwhm 5 -event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 
>> 1 -TR 2 -refeventdur .25 -polyfit 2 -per-run -force -nuisreg 
>> nuisreg.dat 6 -tpexclude tpexclude.dat -b0dc -setwdelay
>> 
>> but I just got the error:
>> 
>> ERROR: Flag -setwdelay unrecognized.
>> 
>> I also tried using the flag when setting up the contrasts but that 
>> didn’t work either.
>> 
>> so not quite sure what I’m doing wrong.  I had understood from your 
>> response below that the contrast weights didn’t need to be changed 
>> from the spmhrf 0 case but perhaps I misunderstood?
>> 
>> any help would be welcome!
>> 
>> Joe
>> 
>>> On Jul 10, 2013, at 13:58, Douglas N Greve <gr...@nmr.mgh.harvard.edu 
>>> <mailto:gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>>> 
>>> wrote:
>>> 
>>> 
>>> I was just thinking you could load the beta into matlab, make the
>>> Calhoun computations on each condition, then compute the contrasts, then
>>> write out the new volume
>>> 
>>> 
>>> On 07/10/2013 0

Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2016-03-13 Thread Joseph Dien
After a long break, back to this…

My goal is still to get the betas for the first and maybe second spm hrf so I 
can calculate a Calhoun derivative boost measure.

As a first step I ran:

mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh -fwhm 5 
-event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 1 -TR 2 
-refeventdur .25 -polyfit 2 -per-run -force -nuisreg nuisreg.dat 6 -tpexclude 
tpexclude.dat -b0dc

to use the SPM HRF with one derivative.

Then:

selxavg3-sess -sf sessidlistALL.dat -analysis RPA.sm05.lh

I got the following error:

ERROR: flac_evconw(): conVinc, Condition01 evrw dim mismatch
This condition has 2 regressors, but evrm has 1
Struct contents reference from a non-struct array object.

Error in flac_conmat (line 37)
if(nthcon > length(flac.con))

Error in flac_customize (line 369)
  flacnew = flac_conmat(flacnew,nthcon);

Error in fast_selxavg3 (line 65)
flac0 = flac_customize(flac0);
 
>> --
ERROR: fast_selxavg3() failed\n

This ran fine with spmhrf 0

based on your prior response below that:

"This is what happens. If you want to use the derivatives, 
then you need to spec -setwdelay. When you run the command, it will prompt you
for 3 values to use. If you spec 1 0 0, then it will be the same as the
default. If you want to test only the first derivative, then you would spec 0 1 
0. Note that the 3rd regressor is the 2nd derivative wrt time, not the first 
derivative wrt the dispersion parameter. You
cannot get the Calhoun 2004 value using a contrast (it is non-linear).”

I tried:

mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh -fwhm 5 
-event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 1 -TR 2 
-refeventdur .25 -polyfit 2 -per-run -force -nuisreg nuisreg.dat 6 -tpexclude 
tpexclude.dat -b0dc -setwdelay

but I just got the error:

ERROR: Flag -setwdelay unrecognized.

I also tried using the flag when setting up the contrasts but that didn’t work 
either.

so not quite sure what I’m doing wrong.  I had understood from your response 
below that the contrast weights didn’t need to be changed from the spmhrf 0 
case but perhaps I misunderstood?

any help would be welcome!

Joe

> On Jul 10, 2013, at 13:58, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote:
> 
> 
> I was just thinking you could load the beta into matlab, make the 
> Calhoun computations on each condition, then compute the contrasts, then 
> write out the new volume
> 
> 
> On 07/10/2013 01:40 PM, Joseph Dien wrote:
>> Sounds good!
>> 
>> Regarding creating a new volume and computing contrasts from it, what 
>> do you mean?  I didn't follow that.
>> 
>> Thanks!
>> 
>> Joe
>> 
>> 
>> On Jul 10, 2013, at 1:33 PM, Douglas N Greve 
>> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu> 
>> <mailto:gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>>> wrote:
>> 
>>> 
>>> On 07/10/2013 01:29 PM, Joseph Dien wrote:
>>>> Sorry, not following what you are suggesting?
>>>> 
>>>> I want the second derivative for calculating the Calhoun et al 2004
>>>> derivative boost measure.
>>>> My understanding is that to the extent that the BOLD signal deviates
>>>> from the canonical hrf, the amplitude of the primary regressor will be
>>>> attenuated and the variance will instead end up in the first and
>>>> second derivatives (to the extent that they are able to accommodate
>>>> the divergence).  By using a Calhoun measure that incorporates both
>>>> the first and second derivatives, in principle I'll have a BOLD
>>>> measure that is more robust to deviations from the canonical hrf.
>>> Sorry, it had been a while since I read that paper. I did not know that
>>> they had a formulation that included the 2nd derivative.
>>>> 
>>>> However, if the way FSFAST is calculating the second derivative
>>>> regressor is resulting in loss of statistical power due to shared
>>>> variance with the primary regressor, then it would be best to just not
>>>> include it at all in the estimation step.
>>> I don't know how much it will hurt the power. You'd have to look at the
>>> efficiency.
>>> doug
>>> 
>>>> 
>>>> 
>>>> On Jul 10, 2013, at 1:21 PM, Douglas N Greve
>>>> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu> 
>>>> <mailto:gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> 
>>>> <mailto:gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>>> 
>>>> wrote:
>>

Re: [Freesurfer] mysterious fsgd format error (not the end of line problem)

2016-03-06 Thread Joseph Dien
never mind!  It turned out I was forgetting to run a script to move copies of 
the fixed fsgd files into their final locations.  Once I did so the files I 
posted worked fine.  Sorry for the false alarm and thanks for getting back to 
me!

Joe

> On Mar 3, 2016, at 12:18, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote:
> 
> I cannot replicate the error. What version of FS are you using? What 
> happens if you run
>  mri_glmfit --fsgd RPA-acc.fsgd
> or
> mri_glmfit --fsgd RPA-accGT.fsgd
> 
> 
> 
> On 02/29/2016 09:38 PM, Joseph Dien wrote:
>> Hi,
>>I’m having an fsgd error that has totally stumped me.  I’m trying to run 
>> the following command to compute the second level statistics:
>> 
>> mri_glmfit --surf fsaverage lh --y ces.nii.gz --wls cesvar.nii.gz  --nii.gz 
>> --fsgd RPA-accGT.fsgd --glmdir conVinc_normAcc.wls --C main.mtx --C 
>> normAcc.mtx
>> 
>> I get the error message:
>> 
>> Reading source surface /Volumes/Data2/RP1/freesurfer/fsaverage/surf/lh.white
>> gdfReadHeader: reading RPA-accGT.fsgd
>> FSGDF Format Error: file = RPA-accGT.fsgd, tag=Title
>> 
>> I used the utility flip to make sure the file was in UNIX format (with 
>> linefeeds).
>> I then double-checked by reading in the binary codes with Matlab’s fread and 
>> directly checking the ASCII numbers, which are indeed ASCII 10 (linefeed).
>> 
>> Here is the contents of the fsgd file.
>> 
>> GroupDescriptorFile 1
>> Title RP1
>> Class Main
>> Variables LogoAcc NormAcc OrthAcc PhonAcc
>> InputRPA903  Main0.750.790.770.62
>> InputRPA906  Main0.810.810.830.74
>> InputRPA907  Main0.871   0.840.83
>> InputRPA908  Main0.910.930.950.89
>> InputRPA909  Main0.740.950.720.72
>> InputRPA910  Main0.850.960.810.79
>> InputRPA912  Main0.750.780.730.73
>> InputRPA914  Main0.7 0.850.830.81
>> InputRPA915  Main0.850.890.750.83
>> InputRPA916  Main0.840.920.870.72
>> InputRPA917  Main0.830.930.920.83
>> InputRPA918  Main0.870.910.790.85
>> InputRPA919  Main0.860.960.910.88
>> InputRPA920  Main0.840.920.870.84
>> InputRPA921  Main0.870.920.880.85
>> InputRPA922  Main0.8 0.9 0.9 0.72
>> 
>> What’s really driving me to distraction is that a previous version of this 
>> file (with a different set of participants) works fine.  I’m attaching both. 
>>  RPA-accGT.fsgd does not work and RPA-acc.fsgd does work.  Using Matlab’s 
>> fread, the first 85 characters (first four lines) of both files are 
>> identical.
>> 
>> I’m running on OS X 10.11.3.  I’m using FSFAST 5.20.  Matlab 2015b.
>> 
>> Any help would be greatly appreciated!
>> 
>> Joe
>> 
>> 
>> 
>> 
>> 
>> Joseph Dien, PhD
>> Senior Research Scientist
>> Maryland Neuroimaging Center
>> University of Maryland, College Park
>> E-mail: jdie...@mac.com
>> Cell Phone: 202-297-8117
>> http://joedien.com
>> 
>> 
>> 
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> -- 
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
> Phone Number: 617-724-2358
> Fax: 617-726-7422
> 
> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting 
> <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 
> <https://gate.nmr.mgh.harvard.edu/filedrop2>
> www.nmr.mgh.harvard.edu/facility/filedrop/index.html 
> <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ 
> <ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/>
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer 
> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer>
> 
> 
> The information in this e-mail is intended only for the person to 

Re: [Freesurfer] mysterious fsgd format error (not the end of line problem)

2016-03-01 Thread Joseph Dien
Oops, never mind.  User error.  I’m too embarrassed to even explain what I did. 
 :)

Joe

> On Feb 29, 2016, at 21:38, Joseph Dien <jdie...@mac.com> wrote:
> 
> Hi,
>   I’m having an fsgd error that has totally stumped me.  I’m trying to run 
> the following command to compute the second level statistics:
> 
> mri_glmfit --surf fsaverage lh --y ces.nii.gz --wls cesvar.nii.gz  --nii.gz 
> --fsgd RPA-accGT.fsgd --glmdir conVinc_normAcc.wls --C main.mtx --C 
> normAcc.mtx
> 
> I get the error message:
> 
> Reading source surface /Volumes/Data2/RP1/freesurfer/fsaverage/surf/lh.white
> gdfReadHeader: reading RPA-accGT.fsgd
> FSGDF Format Error: file = RPA-accGT.fsgd, tag=Title
> 
> I used the utility flip to make sure the file was in UNIX format (with 
> linefeeds).
> I then double-checked by reading in the binary codes with Matlab’s fread and 
> directly checking the ASCII numbers, which are indeed ASCII 10 (linefeed).
> 
> Here is the contents of the fsgd file.
> 
> GroupDescriptorFile 1
> Title RP1
> Class Main
> Variables LogoAcc NormAcc OrthAcc PhonAcc
> Input RPA903  Main0.750.790.770.62
> Input RPA906  Main0.810.810.830.74
> Input RPA907  Main0.871   0.840.83
> Input RPA908  Main0.910.930.950.89
> Input RPA909  Main0.740.950.720.72
> Input RPA910  Main0.850.960.810.79
> Input RPA912  Main0.750.780.730.73
> Input RPA914  Main0.7 0.850.830.81
> Input RPA915  Main0.850.890.750.83
> Input RPA916  Main0.840.920.870.72
> Input RPA917  Main0.830.930.920.83
> Input RPA918  Main0.870.910.790.85
> Input RPA919  Main0.860.960.910.88
> Input RPA920  Main0.840.920.870.84
> Input RPA921  Main0.870.920.880.85
> Input RPA922  Main0.8 0.9 0.9 0.72
> 
> What’s really driving me to distraction is that a previous version of this 
> file (with a different set of participants) works fine.  I’m attaching both.  
> RPA-accGT.fsgd does not work and RPA-acc.fsgd does work.  Using Matlab’s 
> fread, the first 85 characters (first four lines) of both files are identical.
> 
> I’m running on OS X 10.11.3.  I’m using FSFAST 5.20.  Matlab 2015b.
> 
> Any help would be greatly appreciated!
> 
> Joe
> 
> 
> 
> 
> Joseph Dien, PhD
> Senior Research Scientist
> Maryland Neuroimaging Center
> University of Maryland, College Park
> E-mail: jdie...@mac.com
> Cell Phone: 202-297-8117
> http://joedien.com
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 
> 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.



Joseph Dien, PhD
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland, College Park
E-mail: jdie...@mac.com
Cell Phone: 202-297-8117
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] mysterious fsgd format error (not the end of line problem)

2016-02-29 Thread Joseph Dien
Hi,
   I’m having an fsgd error that has totally stumped me.  I’m trying to run the 
following command to compute the second level statistics:

mri_glmfit --surf fsaverage lh --y ces.nii.gz --wls cesvar.nii.gz  --nii.gz 
--fsgd RPA-accGT.fsgd --glmdir conVinc_normAcc.wls --C main.mtx --C normAcc.mtx

I get the error message:

Reading source surface /Volumes/Data2/RP1/freesurfer/fsaverage/surf/lh.white
gdfReadHeader: reading RPA-accGT.fsgd
FSGDF Format Error: file = RPA-accGT.fsgd, tag=Title

I used the utility flip to make sure the file was in UNIX format (with 
linefeeds).
I then double-checked by reading in the binary codes with Matlab’s fread and 
directly checking the ASCII numbers, which are indeed ASCII 10 (linefeed).

Here is the contents of the fsgd file.

GroupDescriptorFile 1
Title RP1
Class Main
Variables LogoAcc NormAcc OrthAcc PhonAcc
Input   RPA903  Main0.750.790.770.62
Input   RPA906  Main0.810.810.830.74
Input   RPA907  Main0.871   0.840.83
Input   RPA908  Main0.910.930.950.89
Input   RPA909  Main0.740.950.720.72
Input   RPA910  Main0.850.960.810.79
Input   RPA912  Main0.750.780.730.73
Input   RPA914  Main0.7 0.850.830.81
Input   RPA915  Main0.850.890.750.83
Input   RPA916  Main0.840.920.870.72
Input   RPA917  Main0.830.930.920.83
Input   RPA918  Main0.870.910.790.85
Input   RPA919  Main0.860.960.910.88
Input   RPA920  Main0.840.920.870.84
Input   RPA921  Main0.870.920.880.85
Input   RPA922  Main0.8 0.9 0.9 0.72

What’s really driving me to distraction is that a previous version of this file 
(with a different set of participants) works fine.  I’m attaching both.  
RPA-accGT.fsgd does not work and RPA-acc.fsgd does work.  Using Matlab’s fread, 
the first 85 characters (first four lines) of both files are identical.

I’m running on OS X 10.11.3.  I’m using FSFAST 5.20.  Matlab 2015b.

Any help would be greatly appreciated!

Joe



RPA-accGT.fsgd
Description: Binary data


RPA-acc.fsgd
Description: Binary data



Joseph Dien, PhD
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland, College Park
E-mail: jdie...@mac.com
Cell Phone: 202-297-8117
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] epidewarp.fsl for FSL 5.x

2016-02-11 Thread Joseph Dien
MegaJoe:fsfastPM jdien$ epidewarp.fsl --mag 
/Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/4-field_map/sRPA003-0004-1-01-01.nii
 --dph 
/Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/5-field_map/sRPA003-0005-1-01-02.nii
 --tediff 2.46 --esp 0.51 --epi fMRI/RPA003/bold/001/f.nii.gz --vsm 
fMRI/RPA003/bold/b0dcmap.nii.gz



> On Feb 10, 2016, at 22:58, Douglas Greve <gr...@nmr.mgh.harvard.edu> wrote:
> 
> what is your command line? I think there is a rescaling in which it expcts 
> the phase to be 0-2048 (or 4096) as this is how it comes of the (siemens) 
> scanner. Could that be the problem?
> 
> 
> On 2/10/16 10:40 PM, Joseph Dien wrote:
>> I ran into the same issue:
>> 
>> FSLVersion 5.0.4
>> FSLVerMaj 5
>> FSL Version is 5.0.4, must be 3.X or 4.X
>> 
>> I downloaded the epidewarp.fsl script from the suggested ftp site and 
>> replaced the existing script.  It did indeed fix the version incompatibility 
>> with FSL 5.x.
>> 
>> I ran into a new problem where it was aborting.  After some trouble shooting 
>> and looking over the documentation, I realized that —-epi is a required 
>> input without which the script crashes (or is it supposed to be optional but 
>> there is a bug in the script?).
>> 
>> After including it, it ran much further but then aborted with the following 
>> error:
>> 
>> ERROR: input phase image exceeds allowable phase range.
>> Allowable range is 6.283 radians.  Image range is: 12.5633 radians.
>> 
>> This is consistent with the documentation.  I’m not sure why the phase image 
>> exceeds the range though.
>> 
>> It ran without problems with SPM’s FieldMap Toolbox and it is from a 
>> standard Siemen’s scanner sequence (two magnitude files and one phase 
>> difference file).
>> 
>> Do I just divide the values by two with something like fslmaths since it 
>> seems to have exactly double the required range?
>> 
>> Joe
>> 
>>> On Nov 26, 2014, at 21:36, Douglas Greve < 
>>> <mailto:gr...@nmr.mgh.harvard.edu>gr...@nmr.mgh.harvard.edu 
>>> <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>> 
>>> 
>>> It is there again. I don't know what the status if it  is in terms of the 
>>> version. Try it and let me know
>>> doug
>>> 
>>> On 11/25/14 4:34 PM, Morgan Hough wrote:
>>>> Hi Doug,
>>>> 
>>>> Could you put the epidewarp.fsl script back on your ftp site? I don’t see 
>>>> it at the link in the archives:
>>>> 
>>>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl
>>>>  
>>>> <ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl>
>>>> 
>>>> BTW, is the script updated in some way for 5.x or can I can the old script 
>>>> just be changed to accept 5.x version numbers. 
>>>> 
>>>> Cheers,
>>>> 
>>>> -Morgan
>>> 
>>> ___
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer 
>>> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer>
>>> 
>>> 
>>> 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 
>>> <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.
>> 
>> 
>> 
>> Joseph Dien, PhD
>> Senior Research Scientist
>> Maryland Neuroimaging Center
>> University of Maryland, College Park
>> E-mail: jdie...@mac.com <mailto:jdie...@mac.com>
>> Cell Phone: 202-297-8117
>> http://joedien.com <http://joedien.com/>
>> 
>> 
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer 
>> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer&g

Re: [Freesurfer] epidewarp.fsl for FSL 5.x

2016-02-11 Thread Joseph Dien
using spm_read_vols I confirmed that the min and max of the phase difference 
file is indeed -4096 and 4092 respectively.

Further troubleshooting epidewarp.fsl indicates that the script is correctly 
branching to "# Input is phase difference and magnitude”

It then executes the following commands:

  # Rescale the delta phase to be between -pi and pi. Starts out
  # at 0 - 4095. Make sure the phase is float precision with _32R
  set cmd = ($FSLToFloat $dph -sub 2047.5 -mul 0.00153435539 $tmpdir/dph 
$FSLToFloatFlag )
  echo $cmd |& tee -a $LF
  $cmd |& tee -a $LF
  if($status) exit 1;

what echoes to the screen is:

fslmaths 
/Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/5-field_map/sRPA003-0005-1-01-02.nii
 -sub 2047.5 -mul 0.00153435539 fMRI/RPA003/bold/tmp-epidewarp.90814.fsl/dph 
-odt float

it then aborts at the next section:

  cp $tmpdir/dph.$ext $tmpdir/dph.preprelude.$ext
  set dph = $tmpdir/dph
  if($#epimat) cp $epimat `dirname $dph`/`basename $dph .$ext`.mat # Copy 
matfile

  # Do the phase unwrapping (-f for 3D, -v for verbose)
  set cmd = (prelude -p $dph -a $mag -o $dph -f -v -m $head);
  echo $cmd |& tee -a $LF
  $cmd |& tee -a $LF
  if($status) exit 1;

So apparently this rescaling command is not doing so correctly?  The script 
comment says it expects the values to be between 0 and 4095 whereas the file 
goes to -4096 so perhaps that was a bit more negative than it was expecting?

Joe


> On Feb 11, 2016, at 11:12, Joseph Dien <jdie...@mac.com> wrote:
> 
> MegaJoe:fsfastPM jdien$ epidewarp.fsl --mag 
> /Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/4-field_map/sRPA003-0004-1-01-01.nii
>  --dph 
> /Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/5-field_map/sRPA003-0005-1-01-02.nii
>  --tediff 2.46 --esp 0.51 --epi fMRI/RPA003/bold/001/f.nii.gz --vsm 
> fMRI/RPA003/bold/b0dcmap.nii.gz
> 
> 
> 
>> On Feb 10, 2016, at 22:58, Douglas Greve <gr...@nmr.mgh.harvard.edu 
>> <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>> 
>> what is your command line? I think there is a rescaling in which it expcts 
>> the phase to be 0-2048 (or 4096) as this is how it comes of the (siemens) 
>> scanner. Could that be the problem?
>> 
>> 
>> On 2/10/16 10:40 PM, Joseph Dien wrote:
>>> I ran into the same issue:
>>> 
>>> FSLVersion 5.0.4
>>> FSLVerMaj 5
>>> FSL Version is 5.0.4, must be 3.X or 4.X
>>> 
>>> I downloaded the epidewarp.fsl script from the suggested ftp site and 
>>> replaced the existing script.  It did indeed fix the version 
>>> incompatibility with FSL 5.x.
>>> 
>>> I ran into a new problem where it was aborting.  After some trouble 
>>> shooting and looking over the documentation, I realized that —-epi is a 
>>> required input without which the script crashes (or is it supposed to be 
>>> optional but there is a bug in the script?).
>>> 
>>> After including it, it ran much further but then aborted with the following 
>>> error:
>>> 
>>> ERROR: input phase image exceeds allowable phase range.
>>> Allowable range is 6.283 radians.  Image range is: 12.5633 radians.
>>> 
>>> This is consistent with the documentation.  I’m not sure why the phase 
>>> image exceeds the range though.
>>> 
>>> It ran without problems with SPM’s FieldMap Toolbox and it is from a 
>>> standard Siemen’s scanner sequence (two magnitude files and one phase 
>>> difference file).
>>> 
>>> Do I just divide the values by two with something like fslmaths since it 
>>> seems to have exactly double the required range?
>>> 
>>> Joe
>>> 
>>>> On Nov 26, 2014, at 21:36, Douglas Greve < 
>>>> <mailto:gr...@nmr.mgh.harvard.edu>gr...@nmr.mgh.harvard.edu 
>>>> <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>>> 
>>>> 
>>>> It is there again. I don't know what the status if it  is in terms of the 
>>>> version. Try it and let me know
>>>> doug
>>>> 
>>>> On 11/25/14 4:34 PM, Morgan Hough wrote:
>>>>> Hi Doug,
>>>>> 
>>>>> Could you put the epidewarp.fsl script back on your ftp site? I don’t see 
>>>>> it at the link in the archives:
>>>>> 
>>>>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl
>>>>>  
>>>>> <ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl>
>>>>> 
>>>>> BTW, is the script updated in some way for 5.x or can I can the old 
>>>>> 

Re: [Freesurfer] epidewarp.fsl for FSL 5.x

2016-02-10 Thread Joseph Dien
I ran into the same issue:

FSLVersion 5.0.4
FSLVerMaj 5
FSL Version is 5.0.4, must be 3.X or 4.X

I downloaded the epidewarp.fsl script from the suggested ftp site and replaced 
the existing script.  It did indeed fix the version incompatibility with FSL 
5.x.

I ran into a new problem where it was aborting.  After some trouble shooting 
and looking over the documentation, I realized that —-epi is a required input 
without which the script crashes (or is it supposed to be optional but there is 
a bug in the script?).

After including it, it ran much further but then aborted with the following 
error:

ERROR: input phase image exceeds allowable phase range.
Allowable range is 6.283 radians.  Image range is: 12.5633 radians.

This is consistent with the documentation.  I’m not sure why the phase image 
exceeds the range though.

It ran without problems with SPM’s FieldMap Toolbox and it is from a standard 
Siemen’s scanner sequence (two magnitude files and one phase difference file).

Do I just divide the values by two with something like fslmaths since it seems 
to have exactly double the required range?

Joe

> On Nov 26, 2014, at 21:36, Douglas Greve <gr...@nmr.mgh.harvard.edu> wrote:
> 
> 
> It is there again. I don't know what the status if it  is in terms of the 
> version. Try it and let me know
> doug
> 
> On 11/25/14 4:34 PM, Morgan Hough wrote:
>> Hi Doug,
>> 
>> Could you put the epidewarp.fsl script back on your ftp site? I don’t see it 
>> at the link in the archives:
>> 
>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl 
>> <ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl>
>> 
>> BTW, is the script updated in some way for 5.x or can I can the old script 
>> just be changed to accept 5.x version numbers. 
>> 
>> Cheers,
>> 
>> -Morgan
> 
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 
> 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.



Joseph Dien, PhD
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland, College Park
E-mail: jdie...@mac.com
Cell Phone: 202-297-8117
http://joedien.com

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] question about how to calculate COV for MNE

2014-04-04 Thread Joseph Dien
Hi,
   I have a question about how to calculate the COV for the MNE software.  As I 
understand it from Section 4.17 of the 2.7.3 MNE manual, if one is averaging 
together COV matrices, one weights them by the number of observations going 
into each one.  I also see from Section 4.17.2 that these are technically not 
covariance matrices so much as sum-of-squares matrices where the epochs going 
into each variable has been baseline corrected.

   Assuming my understanding so far is correct, my question is about how to 
proceed when making linear combinations of COV matrices, as in a difference 
wave, as discussed in Section 6.3.  Would the following be the correct 
procedure?

   Compute the COV separately for the two conditions (say standard and rare 
oddballs).  Subtract the two COV matrices to obtain C0. Then calculate C by 
dividing by Leff, which in turn is calculated as Leff= (L1*L2)/(L1+L2) where L1 
is the number of observations in the first COV matrix and L2 is for the second.

   But if done in this way, the two COV matrices would not be weighted by their 
relative sample sizes.  So would I also weight them by L1 and L2 during the 
subtraction, as done for averaging per 4.17?  But then what is the purpose of 
the Leff calculation? Or is the idea that one would calculate a single COV 
based on both conditions and then one would modify COV by Leff to reflect that 
the signal-to-noise ratio has been reduced by combining two averages with 
differing sample sizes?  But in the case where both samples equal, say, 10, 
Leff would end up equalling 100/20=5.  Dividing C by 5 seems like too much.  
Anyway, very confused.  Any guidance would be appreciated.

Respectfully,

Joe






Joseph Dien,
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com














___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] missing codecs for mne_make_movie

2014-03-26 Thread Joseph Dien
Hi,
   I tried to use mne_make_movie but got the following error:

Movie production selected (from data)...
Scanning /Applications/MNE-2.7.3-3268-MacOSX-i386/lib for plugins
Found lqt_mjpeg.so...Getting codec info from module
Trying to load /Applications/MNE-2.7.3-3268-MacOSX-i386/lib/lqt_mjpeg.so...
dlopen failed for /Applications/MNE-2.7.3-3268-MacOSX-i386/lib/lqt_mjpeg.so: 
dlopen(/Applications/MNE-2.7.3-3268-MacOSX-i386/lib/lqt_mjpeg.so, 2): Library 
not loaded: /opt/local/lib/libjpeg.62.dylib
  Referenced from: /Applications/MNE-2.7.3-3268-MacOSX-i386/lib/lqt_mjpeg.so
  Reason: image not found
ERROR: lqt_find_video_codec failed to find codecs!

The command was:

mne_make_movie --inv RPforMNE-eeg-inv.fif --meas RPforMNE.fif --tmin 0 --tmax 
250 --tstep 10 --stc RPforMNE --view lat --mov RPforMNE

I’m using MNE 2.7.3 under OS X 10.9.2.

Any help would be appreciated.

Joe



Joseph Dien,
Senior Research Scientist
Maryland Neuroimaging Center
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com















___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.



Re: [Freesurfer] beta weights from FS-Fast analysis

2013-07-17 Thread Joseph Dien
I implemented the ROI percent signal change formula following the MarsBaR FAQ 
(http://marsbar.sourceforge.net/faq.html) but the values I'm getting seem too 
small (on the order of .0002%).  Basically the formula is the (beta * peak 
absolute value of the canonical HRF regressor * 100)/(run mean).  No 
derivatives in this case as it is a boxcar design.

I took the mean across all the runs since FSFAST uses the same regressor across 
the entire experiment (unlike SPM).
I used the X.runflac(1).flac.ev(m).Xirf values for the canonical HRF as you 
suggested (where m equals the condition+1). 

Is it possible that I'm missing something in the scaling here?  Especially with 
a boxcar design, the signal change should be much larger than this for a 
significant cluster, I think.  For example, the peak HRF value for one of the 
conditions is 0.0092.  If the betas are already scaled according to the peak 
value, then it would come out as .02%, which is more reasonable, although still 
too small.

Thanks for your help with this!

Joe



On May 31, 2013, at 5:02 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 Oh, right, it is probably not there for subcortical. I don't know what I 
 would have to do to write it out. It won't be something that happens 
 before I get back from HBM. Can you remind me after HBM?
 doug
 
 On 05/31/2013 04:44 PM, Joseph Dien wrote:
 It looks like the corrected vertex p-values 
 (ex: cache.th13.abs.sig.voxel.nii.gz) are only available for the 
 surface-based lh and rh spaces.  For the subcortical volume-based 
 analysis I don't see the corresponding corrected voxel p-values being 
 available?
 
 On May 31, 2013, at 2:46 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com wrote:
 
 
 On May 31, 2013, at 12:11 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly good at this point but
 I have a remaining question:
 
 I assume the contents of sig.nii.gz (which I assume are the vertex
 p-values) are not FWE corrected.  Is it possible to get FWE-corrected
 vertex p-values?  Or are only clusterwise corrections available?
 There should be something like cache.th13.abs.sig.voxel.mgh which is
 corrected on a voxelwise basis (the th13 is just part of the name 
 but it
 should be the same regardless of the threshold you choose)
 doug
 
 Excellent!  Thanks!  :)
 
 
 Thanks again for your patience!
 
 Joe
 
 On May 30, 2013, at 4:37 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 Just to make sure I'm doing this right, I'm going to summarize what
 I've taken away from your answers and to ask some new questions. In
 order to present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to
 show the % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition
 where the cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot
 from the group level analysis to generate a mask for each cluster of
 interest.
 Then I could extract the value of the voxels from each
 subject's cespct file for each contrast, average them across the
 cluster ROI, then average them across each subject, to generate the
 histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 
 2) A results table with the headings:
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from
 the cache.th20.pos/neg.sig.cluster.summary files from the group level
 analysis.
 I can get the peak voxel coordinates from the summary files as well.
 I can use this to get the peak voxel p from the group
 level sig.nii.gz file.  Is this FWE corrected?  If not, how can I get
 this information?
 I can use these coordinates to get the peak voxel T by getting the
 value from the group level F.nii.gz file and taking its square root.
 How can I get the sign of the T statistic?
 I can use the Lancaster transform to convert the MNI305 peak voxel
 coordinates into the Atlas coordinates to look up the putative BA and
 landmarks (unless there is a better way with Freesurfer?  I'm seeing
 some references to some BA labels in the forum but it doesn't look
 like this is a complete set yet?).
 
 Sorry for all these questions!  I got some nice results from FSFAST
 and would like to get them written up.
 
 Cheers!
 
 Joe
 
 
 
 
 On May 29, 2013, at 10:53 PM, Douglas Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 5/29/13 10:42 PM, Joseph Dien wrote:
 
 On May 29, 2013, at 11:40 AM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-07-17 Thread Joseph Dien
then I get on the order of .02% difference between the contrasted conditions.
The run mean values are in my expected ballpark of about 100 or so.
The condition betas are just very very small.
Or perhaps this is typical of FSFAST analyses?

On Jul 17, 2013, at 2:00 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 The beta's have already been scaled. What do you get if you just 
 beta/runmean ?
 
 
 
 On 07/17/2013 01:45 PM, Joseph Dien wrote:
 I implemented the ROI percent signal change formula following the 
 MarsBaR FAQ (http://marsbar.sourceforge.net/faq.html) but the values 
 I'm getting seem too small (on the order of .0002%).  Basically the 
 formula is the (beta * peak absolute value of the canonical HRF 
 regressor * 100)/(run mean).  No derivatives in this case as it is a 
 boxcar design.
 
 I took the mean across all the runs since FSFAST uses the same 
 regressor across the entire experiment (unlike SPM).
 I used the X.runflac(1).flac.ev(m).Xirf values for the canonical HRF 
 as you suggested (where m equals the condition+1).
 
 Is it possible that I'm missing something in the scaling here? 
 Especially with a boxcar design, the signal change should be much 
 larger than this for a significant cluster, I think.  For example, the 
 peak HRF value for one of the conditions is 0.0092.  If the betas are 
 already scaled according to the peak value, then it would come out as 
 .02%, which is more reasonable, although still too small.
 
 Thanks for your help with this!
 
 Joe
 
 
 
 On May 31, 2013, at 5:02 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 Oh, right, it is probably not there for subcortical. I don't know what I
 would have to do to write it out. It won't be something that happens
 before I get back from HBM. Can you remind me after HBM?
 doug
 
 On 05/31/2013 04:44 PM, Joseph Dien wrote:
 It looks like the corrected vertex p-values
 (ex: cache.th13.abs.sig.voxel.nii.gz) are only available for the
 surface-based lh and rh spaces.  For the subcortical volume-based
 analysis I don't see the corresponding corrected voxel p-values being
 available?
 
 On May 31, 2013, at 2:46 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 
 On May 31, 2013, at 12:11 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly good at this point but
 I have a remaining question:
 
 I assume the contents of sig.nii.gz (which I assume are the vertex
 p-values) are not FWE corrected.  Is it possible to get FWE-corrected
 vertex p-values?  Or are only clusterwise corrections available?
 There should be something like cache.th13.abs.sig.voxel.mgh which is
 corrected on a voxelwise basis (the th13 is just part of the name
 but it
 should be the same regardless of the threshold you choose)
 doug
 
 Excellent!  Thanks!  :)
 
 
 Thanks again for your patience!
 
 Joe
 
 On May 30, 2013, at 4:37 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 Just to make sure I'm doing this right, I'm going to summarize what
 I've taken away from your answers and to ask some new questions. In
 order to present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to
 show the % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition
 where the cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot
 from the group level analysis to generate a mask for each cluster of
 interest.
 Then I could extract the value of the voxels from each
 subject's cespct file for each contrast, average them across the
 cluster ROI, then average them across each subject, to generate the
 histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 
 2) A results table with the headings:
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from
 the cache.th20.pos/neg.sig.cluster.summary files from the group 
 level
 analysis.
 I can get the peak voxel coordinates from the summary files as well.
 I can use this to get the peak voxel p from the group
 level sig.nii.gz file.  Is this FWE corrected?  If not, how can 
 I get
 this information?
 I can use these coordinates to get the peak voxel T by getting the
 value from the group level F.nii.gz file and taking its square root.
 How can I get the sign of the T statistic?
 I can use the Lancaster transform to convert the MNI305 peak voxel
 coordinates into the Atlas coordinates to look up the putative 
 BA and
 landmarks (unless there is a better way

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-07-17 Thread Joseph Dien
It's a boxcar design so 20.265.

  mkanalysis-sess -fsd bold -analysis CPA.sm05.lh -surface fsaverage lh 
-fwhm 5 -event-related  -paradigm CPA1.par -nconditions 20 -spmhrf 0 -TR 2 
-refeventdur 20.265 -polyfit 2 -per-run -force -nuisreg nuisreg2.dat 7 
-tpexclude tpexclude.dat

On Jul 17, 2013, at 3:50 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 when you ran mkanalysis-sess, what did you set --refeventdur to?
 On 07/17/2013 02:50 PM, Joseph Dien wrote:
 then I get on the order of .02% difference between the contrasted conditions.
 The run mean values are in my expected ballpark of about 100 or so.
 The condition betas are just very very small.
 Or perhaps this is typical of FSFAST analyses?
 
 On Jul 17, 2013, at 2:00 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 The beta's have already been scaled. What do you get if you just
 beta/runmean ?
 
 
 
 On 07/17/2013 01:45 PM, Joseph Dien wrote:
 I implemented the ROI percent signal change formula following the
 MarsBaR FAQ (http://marsbar.sourceforge.net/faq.html) but the values
 I'm getting seem too small (on the order of .0002%).  Basically the
 formula is the (beta * peak absolute value of the canonical HRF
 regressor * 100)/(run mean).  No derivatives in this case as it is a
 boxcar design.
 
 I took the mean across all the runs since FSFAST uses the same
 regressor across the entire experiment (unlike SPM).
 I used the X.runflac(1).flac.ev(m).Xirf values for the canonical HRF
 as you suggested (where m equals the condition+1).
 
 Is it possible that I'm missing something in the scaling here?
 Especially with a boxcar design, the signal change should be much
 larger than this for a significant cluster, I think.  For example, the
 peak HRF value for one of the conditions is 0.0092.  If the betas are
 already scaled according to the peak value, then it would come out as
 .02%, which is more reasonable, although still too small.
 
 Thanks for your help with this!
 
 Joe
 
 
 
 On May 31, 2013, at 5:02 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 Oh, right, it is probably not there for subcortical. I don't know what I
 would have to do to write it out. It won't be something that happens
 before I get back from HBM. Can you remind me after HBM?
 doug
 
 On 05/31/2013 04:44 PM, Joseph Dien wrote:
 It looks like the corrected vertex p-values
 (ex: cache.th13.abs.sig.voxel.nii.gz) are only available for the
 surface-based lh and rh spaces.  For the subcortical volume-based
 analysis I don't see the corresponding corrected voxel p-values being
 available?
 
 On May 31, 2013, at 2:46 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 
 On May 31, 2013, at 12:11 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly good at this point but
 I have a remaining question:
 
 I assume the contents of sig.nii.gz (which I assume are the vertex
 p-values) are not FWE corrected.  Is it possible to get FWE-corrected
 vertex p-values?  Or are only clusterwise corrections available?
 There should be something like cache.th13.abs.sig.voxel.mgh which is
 corrected on a voxelwise basis (the th13 is just part of the name
 but it
 should be the same regardless of the threshold you choose)
 doug
 
 Excellent!  Thanks!  :)
 
 
 Thanks again for your patience!
 
 Joe
 
 On May 30, 2013, at 4:37 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 Just to make sure I'm doing this right, I'm going to summarize what
 I've taken away from your answers and to ask some new questions. In
 order to present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to
 show the % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition
 where the cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot
 from the group level analysis to generate a mask for each cluster of
 interest.
 Then I could extract the value of the voxels from each
 subject's cespct file for each contrast, average them across the
 cluster ROI, then average them across each subject, to generate the
 histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 
 2) A results table with the headings:
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from
 the cache.th20.pos/neg.sig.cluster.summary files

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-07-17 Thread Joseph Dien
It's a little complicated.  Basically there were eight runs, comprising four 
conditions (me, we, you1, you2) each with two adjoining runs.  For the 
analysis, I merged each of the pairs into a single run and added a nuisance 
regressor to account for the difference in run means.  There were a total of 
four different kinds of boxcars (AR, CS, EM, MP).  So 4x4=16 conditions.  There 
was also a covariate of non-interest to mark the switch point for each boxcar, 
one for each run, so 20 total.

The 7 nuisance regressors are six movement covariates plus one to account for 
merging eight runs into four (it consists of 1 for the first half and -1 for 
the second, so the difference in the run means).  I'm using the movement 
covariates from a prior SPM run since ARTdetect (for detecting bad volumes) 
isn't set up for AFNI style data.  From all published accounts the different 
movement detection routines yield similar enough results that it shouldn't be a 
problem (consistent with what I found when I compared them for this dataset).

You're thinking that collinearity could have reduced the effect sizes?  When I 
correlate the X.X regressor matrix, the 20 predictors don't correlate by more 
than about .2 at worst.  I do see greater correlations with some of the 
nuisance regressors (as high as the .4 range).  Are my betas unusually small 
for FSFAST analyses?  They did come up clusterwise significant at least. Or 
should I not worry?  I'm not sure what to expect from FSFAST analyses.

Thanks!

Joe


On Jul 17, 2013, at 3:58 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 why do you have 20 conditions? And what are the 7 nuisance regressors?
 
 On 07/17/2013 03:54 PM, Joseph Dien wrote:
 It's a boxcar design so 20.265.
 
 mkanalysis-sess -fsd bold -analysis CPA.sm05.lh -surface fsaverage lh 
 -fwhm 5 -event-related-paradigm CPA1.par -nconditions 20 -spmhrf 0 -TR 
 2 -refeventdur 20.265 -polyfit 2 -per-run -force -nuisreg nuisreg2.dat 
 7 -tpexclude tpexclude.dat
 
 On Jul 17, 2013, at 3:50 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 when you ran mkanalysis-sess, what did you set --refeventdur to?
 On 07/17/2013 02:50 PM, Joseph Dien wrote:
 then I get on the order of .02% difference between the contrasted 
 conditions.
 The run mean values are in my expected ballpark of about 100 or so.
 The condition betas are just very very small.
 Or perhaps this is typical of FSFAST analyses?
 
 On Jul 17, 2013, at 2:00 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 The beta's have already been scaled. What do you get if you just
 beta/runmean ?
 
 
 
 On 07/17/2013 01:45 PM, Joseph Dien wrote:
 I implemented the ROI percent signal change formula following the
 MarsBaR FAQ (http://marsbar.sourceforge.net/faq.html) but the values
 I'm getting seem too small (on the order of .0002%).  Basically the
 formula is the (beta * peak absolute value of the canonical HRF
 regressor * 100)/(run mean).  No derivatives in this case as it is a
 boxcar design.
 
 I took the mean across all the runs since FSFAST uses the same
 regressor across the entire experiment (unlike SPM).
 I used the X.runflac(1).flac.ev(m).Xirf values for the canonical HRF
 as you suggested (where m equals the condition+1).
 
 Is it possible that I'm missing something in the scaling here?
 Especially with a boxcar design, the signal change should be much
 larger than this for a significant cluster, I think.  For example, the
 peak HRF value for one of the conditions is 0.0092.  If the betas are
 already scaled according to the peak value, then it would come out as
 .02%, which is more reasonable, although still too small.
 
 Thanks for your help with this!
 
 Joe
 
 
 
 On May 31, 2013, at 5:02 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 Oh, right, it is probably not there for subcortical. I don't know 
 what I
 would have to do to write it out. It won't be something that happens
 before I get back from HBM. Can you remind me after HBM?
 doug
 
 On 05/31/2013 04:44 PM, Joseph Dien wrote:
 It looks like the corrected vertex p-values
 (ex: cache.th13.abs.sig.voxel.nii.gz) are only available for the
 surface-based lh and rh spaces.  For the subcortical volume-based
 analysis I don't see the corresponding corrected voxel p-values 
 being
 available?
 
 On May 31, 2013, at 2:46 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 
 On May 31, 2013, at 12:11 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly

[Freesurfer] fsfast read_surf bug

2013-07-14 Thread Joseph Dien
I've been trying to use the read_surf.m Matlab function included in the Matlab 
folder of 5.3.0 on a Mac under Matlab 2013a.  

 [vertex_coords, faces] = read_surf('fmcpr.sm5.fsaverage.lh.nii');
Undefined function or variable vertex_coords.

Error in read_surf (line 77)
vertex_coords = reshape(vertex_coords, 3, vnum)' ;

It looks as though the reason is that the magic number evaluates as:

6029568

which does not match either of the numbers it is looking for (which denote 
triangle and quad files).

Does that mean that current surface files have a different format and this 
function needs to be updated accordingly?

Anyway, is there some way I can load surface files into Matlab?

I looked through the fsfast Matlab functions but it wasn't clear to me if one 
of them would do.

The best candidate seemed to be fast_read_curv.m but it yielded too many 
numbers so I'm thinking a curvature file is something different.

Thanks!

Joe



Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com//












___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] FSFAST funcroi-sess problem

2013-07-12 Thread Joseph Dien
/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/target.label
 --trgsubject fsaverage --regmethod surface

srclabel = 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/label/lh.cluster-001.label
srcsubject = CPA003
trgsubject = fsaverage
trglabel = 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/target.label
regmethod = surface

srchemi = lh
trghemi = lh
trgsurface = white
srcsurfreg = sphere.reg
trgsurfreg = sphere.reg
usehash = 1
Use ProjAbs  = 0, 0
Use ProjFrac = 0, 0
DoPaint 0

SUBJECTS_DIR/Volumes/Data/CP1/freesurfer
FREESURFER_HOME /Applications/freesurfer
Loading source label.
Found 952 points in source label.
Starting surface-based mapping
Reading source registration 
 /Volumes/Data/CP1/freesurfer/CPA003/surf/lh.sphere.reg
Rescaling ...  original radius = 100
Reading target surface 
 /Volumes/Data/CP1/freesurfer/fsaverage/surf/lh.white
Reading target registration 
 /Volumes/Data/CP1/freesurfer/fsaverage/surf/lh.sphere.reg
Rescaling ...  original radius = 100
Building target registration hash (res=16).
Building source registration hash (res=16).
INFO: found  952 nlabel points
Performing mapping from target back to the source label 163842
Number of reverse mapping hits = 415
Checking for and removing duplicates
Writing label file 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/target.label
 1367
mri_label2label: Done

mri_label2label --hemi lh --srclabel 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/target.label
 --outmask 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/roi.AR-v-CS_HC.HC.th2.neg.cluster1.nii.gz
 --regmethod surface --trglabel 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/junk.label
 --s fsaverage

srclabel = 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/target.label
srcsubject = fsaverage
trgsubject = fsaverage
trglabel = 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/junk.label
regmethod = surface

srchemi = lh
trghemi = lh
trgsurface = white
srcsurfreg = sphere.reg
trgsurfreg = sphere.reg
usehash = 1
Use ProjAbs  = 0, 0
Use ProjFrac = 0, 0
DoPaint 0

SUBJECTS_DIR/Volumes/Data/CP1/freesurfer
FREESURFER_HOME /Applications/freesurfer
Loading source label.
Found 1311 points in source label.
Starting surface-based mapping
Reading source registration 
 /Volumes/Data/CP1/freesurfer/fsaverage/surf/lh.sphere.reg
Rescaling ...  original radius = 100
Reading target surface 
 /Volumes/Data/CP1/freesurfer/fsaverage/surf/lh.white
Reading target registration 
 /Volumes/Data/CP1/freesurfer/fsaverage/surf/lh.sphere.reg
Rescaling ...  original radius = 100
Building target registration hash (res=16).
Building source registration hash (res=16).
INFO: found  1311 nlabel points
Performing mapping from target back to the source label 163842
Number of reverse mapping hits = 0
Checking for and removing duplicates
Creating output 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/roi.AR-v-CS_HC.HC.th2.neg.cluster1.nii.gz
Writing label file 
/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/junk.label
 1311
mri_label2label: Done

Ended   at Fri Jul 12 18:23:48 EDT 2013
funcroi-sess completed




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com//












___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] FSFAST funcroi-sess problem

2013-07-12 Thread Joseph Dien
I followed the tutorial:

  mkanalysis-sess -fsd bold -analysis CPA.sm05.lh -surface fsaverage lh 
-fwhm 5 -event-related  -paradigm CPA1.par -nconditions 20 -spmhrf 0 -TR 2 
-refeventdur 20.265 -polyfit 2 -per-run -force -nuisreg nuisreg2.dat 7 
-tpexclude tpexclude.dat




On Jul 12, 2013, at 7:34 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 Hi Joe,
 
 
 On 07/12/2013 06:51 PM, Joseph Dien wrote:
 I'm using Freesurfer 5.3.0
 
 (well, actually I ran the original analyses with 5.2.0 and then am 
 running this ROI follow-up with 5.2.0, could that be a problem? From 
 the release notes, it didn't look like it would be an issue)
 No, that is fine.
 
 Anyway, I've run the following set of commands:
 
 funcroi-config -roi 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/roi.AR-v-CS_HC.HC.th2.neg.cluster1.roicfg
  
 -annot 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
  
 cluster-001 -analysis CPA.sm05.lh
 
 funcroi-sess -roi 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/roi.AR-v-CS_HC.HC.th2.neg.cluster1.roicfg
  
 -s CPA003 -d .
 
 I get the following output.
 
 When I checked the results with:
 
 tksurfer fsaverage lh inflated -overlay 
 roi.AR-v-CS_HC.HC.th2.neg.cluster1.nii.gz -fthresh .5
 
 sure enough, it didn't look right. Instead of the cluster, I got 
 speckles all over the surface.
 
 I used the Matlab command:
 
 [vertex_coords, faces] = read_surf('lh.white');
 
 and found sure enough that the size of the vertex array was only 
 143827 whereas mri_info indicates that the ocn file has 163842
 When you made the analysis (mkanalysis-sess), do you specify the subject 
 as self or fsaverage?
 doug
 
 Any suggestions what I might be doing wrong?
 
 Thanks!
 
 Joe
 
 ---
 /Volumes/Data/CP1/fsfast/CPA003
 Fri Jul 12 18:23:28 EDT 2013
 mri_annotation2label --subject CPA003 --hemi lh --annotation 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
  
 --outdir 
 /Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/label
 subject = CPA003
 annotation = 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 hemi = lh
 outdir = 
 /Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/tmp.funcroi-sess.roi.AR-v-CS_HC.HC.th2.neg.cluster1/label
 surface = white
 
 Reading surface
 /Volumes/Data/CP1/freesurfer/CPA003/surf/lh.white
 Loading annotations from 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143827 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143828 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143829 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143830 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143831 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143832 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 143833 
 i=, in_array_size=143827
 
 …
 
 MRISreadAnnotationIntoArray: vertex index out of range: 163838 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 163839 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 163840 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20.neg.sig.ocn.annot
 MRISreadAnnotationIntoArray: vertex index out of range: 163841 
 i=, in_array_size=143827
 annot file: 
 /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/AR-v-CS/AR-v-CS_HC.wls/HC/cache.th20

[Freesurfer] minor fsfast bug report

2013-07-12 Thread Joseph Dien
In the annot files generated by mri_glmfit-sim in 5.2.0 (e.g., 
cache.th20.pos.sig.ocn.annot), the names of the clusters take the form:

cluster0
cluster-001
cluster-002
…

but the last one is of the form

cluster6

which is to say, no dash and no zero-padding.

I assume they are meant to have a consistent format.

Not a big deal, but consistency would be helpful for scripts.

Cheers!

Joe











Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com//












___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2013-07-10 Thread Joseph Dien
I'm thinking of generating a modified beta.nii.gz file where the primary betas 
have been replaced with the Calhoun et al (2004) derivative boost measure.  
What do you think?  Also, please note my question below about the second 
derivative as it is causing me concern about my analysis.  Thanks!

Joe


On Jul 10, 2013, at 12:39 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 I think that would work. You would need to change the time stamps on the 
 .mat file in the analysis folder. When you re-run selxavg3-sess, it will 
 see that the .mat files are newer than the beta and regenerate the 
 contrasts. But what are you planning to do the the beta file? It sounds 
 like a potentially bad idea
 
 doug
 
 
 On 07/09/2013 10:26 PM, Joseph Dien wrote:
 It looks as though selxavg3-sess generates the contrast analyses at 
 the same time as the beta weights.  Would it be possible to 
 run selxavg3-sess once to obtain the beta weights, modify the 
 beta.nii.gz file, and then rerun selxavg3-sess to obtain the contrast 
 statistics using the modified beta weights?
 
 Joe
 
 On Jul 9, 2013, at 5:08 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com wrote:
 
 I tried correlations and the 2nd derivative is definitely not 
 orthogonal.
 
 corrcoef([X(1:207,4) X(1:207,5) X(1:207,6)])
 
 ans =
 
1.   -0.   -0.5427
   -0.1.   -0.0298
   -0.5427   -0.02981.
 
 I looked at the regressors that SPM generates for the same data:
 
 ans =
 
1.0.04360.1740
0.04361.   -0.0226
0.1740   -0.02261.
 
 The first derivative is not as orthogonal but the second derivative 
 was much more orthogonal.
 Does this have to do with what you noted below about how the second 
 derivative is being calculated?
 So does this mean I should avoid the spmhrf 2 option entirely to 
 avoid loss of statistical power?
 
 Thanks for the help!
 
 Joe
 
 
 On Jul 9, 2013, at 4:34 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com wrote:
 
 Thanks for the quick response!  So if I wanted to use the Calhoun 
 2004 approach, I should be able to use the Steffener 2010 correction 
 to address the violation of the assumption that the regressors were 
 standardized and generate a new beta.nii.gz file where the primary 
 beta values have been replaced with the Calhoun 2004 measure.  Can I 
 assume the three regressors are more or less orthogonal?  I got 
 non-zero numbers when I tried to test the assumption in the Xtmp.X 
 variable
 
 sum(X(1:207,4).*X(1:207,5))
 
 but not hugely non-zero so maybe just rounding errors?
 
 
 On Jul 9, 2013, at 4:16 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 07/09/2013 04:11 PM, Joseph Dien wrote:
 Hi,
  I have a question about how mkcontrast-sess works.  I ran an
 analysis using the mkanalysis-sess option spmhrf 2 so there are three
 regressors for each predictor, the primary, the latency, and the
 dispersion.  When specifying the contrast weights for 
 mkcontrast-sess,
 the documentation indicates that they are specified in terms of the
 conditions as numbered in the paradigm file, not the individual
 regressors.  Furthermore there only appears to be one contrast value
 output for each contrast, not three.
 
 How are the three regressors being handled?  I can think of several
 scenarios:
 
 1) the contrast weights are not actually in terms of conditions (the
 documentation is incorrect), they are actually in terms of the
 regressors (so contrasting conditions 1 and 2 could be specified 
 as -a
 1 -a 2 -a 3 -c 4 -c 5 -c 6).
 
 2) the latency and dispersion regressors are being ignored (a common
 practice).  The contrast weights should therefore be specified as 
 -a 1
 -c 2.
 This is what happens. If you want to use the derivatives, then you 
 need
 to spec -setwdelay. When you run the command, it will prompt you for 3
 values to use. If you spec 1 0 0, then it will be the same as the
 default. If you want to test only the first derivative, then you would
 spec 0 1 0. Note that the 3rd regressor is the 2nd derivative wrt 
 time,
 not the first derivative wrt the dispersion parameter. You cannot get
 the Calhoun 2004 value using a contrast (it is non-linear).
 doug
 
 3) The Calhoun et al (2004) approach is being used to combine the
 three regressors into a derivative boost amplitude
 measure.  The contrast weights should therefore be specified as -a 
 1 -c 2.
 
 Thanks for any help you can give me!
 
 Joe
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland
 
 E-mail: jdie...@mac.com mailto:jdie...@mac.com 
 mailto:jdie...@mac.com
 Phone: 202-297-8117
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2013-07-10 Thread Joseph Dien
Sorry, not following what you are suggesting?

I want the second derivative for calculating the Calhoun et al 2004 derivative 
boost measure.
My understanding is that to the extent that the BOLD signal deviates from the 
canonical hrf, the amplitude of the primary regressor will be attenuated and 
the variance will instead end up in the first and second derivatives (to the 
extent that they are able to accommodate the divergence).  By using a Calhoun 
measure that incorporates both the first and second derivatives, in principle 
I'll have a BOLD measure that is more robust to deviations from the canonical 
hrf.

However, if the way FSFAST is calculating the second derivative regressor is 
resulting in loss of statistical power due to shared variance with the primary 
regressor, then it would be best to just not include it at all in the 
estimation step.


On Jul 10, 2013, at 1:21 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 Why not just create a new volume and then compute contrasts from the new 
 volume? What you are suggesting will work I think, but it leaves me a 
 little nervous. The p-values will be meaningless.
 
 
 As for the 2nd derivative, I think it must be a numerical issue (it is 
 not computed analytically). Why do you need the 2nd derivative?
 
 doug
 
 
 
 On 07/10/2013 12:47 PM, Joseph Dien wrote:
 I'm thinking of generating a modified beta.nii.gz file where the 
 primary betas have been replaced with the Calhoun et al (2004) 
 derivative boost measure.  What do you think?  Also, please note my 
 question below about the second derivative as it is causing me concern 
 about my analysis.  Thanks!
 
 Joe
 
 
 On Jul 10, 2013, at 12:39 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 I think that would work. You would need to change the time stamps on the
 .mat file in the analysis folder. When you re-run selxavg3-sess, it will
 see that the .mat files are newer than the beta and regenerate the
 contrasts. But what are you planning to do the the beta file? It sounds
 like a potentially bad idea
 
 doug
 
 
 On 07/09/2013 10:26 PM, Joseph Dien wrote:
 It looks as though selxavg3-sess generates the contrast analyses at
 the same time as the beta weights.  Would it be possible to
 run selxavg3-sess once to obtain the beta weights, modify the
 beta.nii.gz file, and then rerun selxavg3-sess to obtain the contrast
 statistics using the modified beta weights?
 
 Joe
 
 On Jul 9, 2013, at 5:08 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 I tried correlations and the 2nd derivative is definitely not
 orthogonal.
 
 corrcoef([X(1:207,4) X(1:207,5) X(1:207,6)])
 
 ans =
 
   1.   -0.   -0.5427
  -0.1.   -0.0298
  -0.5427   -0.02981.
 
 I looked at the regressors that SPM generates for the same data:
 
 ans =
 
   1.0.04360.1740
   0.04361.   -0.0226
   0.1740   -0.02261.
 
 The first derivative is not as orthogonal but the second derivative
 was much more orthogonal.
 Does this have to do with what you noted below about how the second
 derivative is being calculated?
 So does this mean I should avoid the spmhrf 2 option entirely to
 avoid loss of statistical power?
 
 Thanks for the help!
 
 Joe
 
 
 On Jul 9, 2013, at 4:34 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 Thanks for the quick response!  So if I wanted to use the Calhoun
 2004 approach, I should be able to use the Steffener 2010 correction
 to address the violation of the assumption that the regressors were
 standardized and generate a new beta.nii.gz file where the primary
 beta values have been replaced with the Calhoun 2004 measure.  Can I
 assume the three regressors are more or less orthogonal?  I got
 non-zero numbers when I tried to test the assumption in the Xtmp.X
 variable
 
 sum(X(1:207,4).*X(1:207,5))
 
 but not hugely non-zero so maybe just rounding errors?
 
 
 On Jul 9, 2013, at 4:16 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 07/09/2013 04:11 PM, Joseph Dien wrote:
 Hi,
 I have a question about how mkcontrast-sess works.  I ran an
 analysis using the mkanalysis-sess option spmhrf 2 so there are 
 three
 regressors for each predictor, the primary, the latency, and the
 dispersion.  When specifying the contrast weights for
 mkcontrast-sess,
 the documentation indicates that they are specified in terms of the
 conditions as numbered in the paradigm file, not the individual
 regressors.  Furthermore there only appears to be one contrast value
 output for each contrast, not three.
 
 How are the three regressors being handled?  I can think of several
 scenarios:
 
 1) the contrast weights are not actually in terms of conditions (the
 documentation is incorrect), they are actually in terms of the
 regressors (so contrasting conditions 1 and 2

Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2013-07-10 Thread Joseph Dien
Sounds good!

Regarding creating a new volume and computing contrasts from it, what do you 
mean?  I didn't follow that.

Thanks!

Joe


On Jul 10, 2013, at 1:33 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 On 07/10/2013 01:29 PM, Joseph Dien wrote:
 Sorry, not following what you are suggesting?
 
 I want the second derivative for calculating the Calhoun et al 2004 
 derivative boost measure.
 My understanding is that to the extent that the BOLD signal deviates 
 from the canonical hrf, the amplitude of the primary regressor will be 
 attenuated and the variance will instead end up in the first and 
 second derivatives (to the extent that they are able to accommodate 
 the divergence).  By using a Calhoun measure that incorporates both 
 the first and second derivatives, in principle I'll have a BOLD 
 measure that is more robust to deviations from the canonical hrf.
 Sorry, it had been a while since I read that paper. I did not know that 
 they had a formulation that included the 2nd derivative.
 
 However, if the way FSFAST is calculating the second derivative 
 regressor is resulting in loss of statistical power due to shared 
 variance with the primary regressor, then it would be best to just not 
 include it at all in the estimation step.
 I don't know how much it will hurt the power. You'd have to look at the 
 efficiency.
 doug
 
 
 
 On Jul 10, 2013, at 1:21 PM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 Why not just create a new volume and then compute contrasts from the new
 volume? What you are suggesting will work I think, but it leaves me a
 little nervous. The p-values will be meaningless.
 
 
 As for the 2nd derivative, I think it must be a numerical issue (it is
 not computed analytically). Why do you need the 2nd derivative?
 
 doug
 
 
 
 On 07/10/2013 12:47 PM, Joseph Dien wrote:
 I'm thinking of generating a modified beta.nii.gz file where the
 primary betas have been replaced with the Calhoun et al (2004)
 derivative boost measure.  What do you think?  Also, please note my
 question below about the second derivative as it is causing me concern
 about my analysis.  Thanks!
 
 Joe
 
 
 On Jul 10, 2013, at 12:39 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 I think that would work. You would need to change the time stamps 
 on the
 .mat file in the analysis folder. When you re-run selxavg3-sess, it 
 will
 see that the .mat files are newer than the beta and regenerate the
 contrasts. But what are you planning to do the the beta file? It sounds
 like a potentially bad idea
 
 doug
 
 
 On 07/09/2013 10:26 PM, Joseph Dien wrote:
 It looks as though selxavg3-sess generates the contrast analyses at
 the same time as the beta weights.  Would it be possible to
 run selxavg3-sess once to obtain the beta weights, modify the
 beta.nii.gz file, and then rerun selxavg3-sess to obtain the contrast
 statistics using the modified beta weights?
 
 Joe
 
 On Jul 9, 2013, at 5:08 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 I tried correlations and the 2nd derivative is definitely not
 orthogonal.
 
 corrcoef([X(1:207,4) X(1:207,5) X(1:207,6)])
 
 ans =
 
  1.   -0.   -0.5427
 -0.1.   -0.0298
 -0.5427   -0.02981.
 
 I looked at the regressors that SPM generates for the same data:
 
 ans =
 
  1.0.04360.1740
  0.04361.   -0.0226
  0.1740   -0.02261.
 
 The first derivative is not as orthogonal but the second derivative
 was much more orthogonal.
 Does this have to do with what you noted below about how the second
 derivative is being calculated?
 So does this mean I should avoid the spmhrf 2 option entirely to
 avoid loss of statistical power?
 
 Thanks for the help!
 
 Joe
 
 
 On Jul 9, 2013, at 4:34 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com
 mailto:jdie...@mac.com wrote:
 
 Thanks for the quick response!  So if I wanted to use the Calhoun
 2004 approach, I should be able to use the Steffener 2010 correction
 to address the violation of the assumption that the regressors were
 standardized and generate a new beta.nii.gz file where the primary
 beta values have been replaced with the Calhoun 2004 measure.  Can I
 assume the three regressors are more or less orthogonal?  I got
 non-zero numbers when I tried to test the assumption in the Xtmp.X
 variable
 
 sum(X(1:207,4).*X(1:207,5))
 
 but not hugely non-zero so maybe just rounding errors?
 
 
 On Jul 9, 2013, at 4:16 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 07/09/2013 04:11 PM, Joseph Dien wrote:
 Hi,
 I have a question about how mkcontrast-sess works.  I ran an
 analysis using the mkanalysis-sess option spmhrf 2 so there are
 three

[Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2013-07-09 Thread Joseph Dien
Hi,
   I have a question about how mkcontrast-sess works.  I ran an analysis using 
the mkanalysis-sess option spmhrf 2 so there are three regressors for each 
predictor, the primary, the latency, and the dispersion.  When specifying the 
contrast weights for mkcontrast-sess, the documentation indicates that they are 
specified in terms of the conditions as numbered in the paradigm file, not the 
individual regressors.  Furthermore there only appears to be one contrast value 
output for each contrast, not three.

How are the three regressors being handled?  I can think of several scenarios:

1) the contrast weights are not actually in terms of conditions (the 
documentation is incorrect), they are actually in terms of the regressors (so 
contrasting conditions 1 and 2 could be specified as -a 1 -a 2 -a 3 -c 4 -c 5 
-c 6).

2) the latency and dispersion regressors are being ignored (a common practice). 
 The contrast weights should therefore be specified as -a 1 -c 2.

3) The Calhoun et al (2004) approach is being used to combine the three 
regressors into a derivative boost amplitude measure.  The contrast weights 
should therefore be specified as -a 1 -c 2.

Thanks for any help you can give me!

Joe



Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2013-07-09 Thread Joseph Dien
Thanks for the quick response!  So if I wanted to use the Calhoun 2004 
approach, I should be able to use the Steffener 2010 correction to address the 
violation of the assumption that the regressors were standardized and generate 
a new beta.nii.gz file where the primary beta values have been replaced with 
the Calhoun 2004 measure.  Can I assume the three regressors are more or less 
orthogonal?  I got non-zero numbers when I tried to test the assumption in the 
Xtmp.X variable 

sum(X(1:207,4).*X(1:207,5))

but not hugely non-zero so maybe just rounding errors?


On Jul 9, 2013, at 4:16 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 On 07/09/2013 04:11 PM, Joseph Dien wrote:
 Hi,
   I have a question about how mkcontrast-sess works.  I ran an 
 analysis using the mkanalysis-sess option spmhrf 2 so there are three 
 regressors for each predictor, the primary, the latency, and the 
 dispersion.  When specifying the contrast weights for mkcontrast-sess, 
 the documentation indicates that they are specified in terms of the 
 conditions as numbered in the paradigm file, not the individual 
 regressors.  Furthermore there only appears to be one contrast value 
 output for each contrast, not three.
 
 How are the three regressors being handled?  I can think of several 
 scenarios:
 
 1) the contrast weights are not actually in terms of conditions (the 
 documentation is incorrect), they are actually in terms of the 
 regressors (so contrasting conditions 1 and 2 could be specified as -a 
 1 -a 2 -a 3 -c 4 -c 5 -c 6).
 
 2) the latency and dispersion regressors are being ignored (a common 
 practice).  The contrast weights should therefore be specified as -a 1 
 -c 2.
 This is what happens. If you want to use the derivatives, then you need 
 to spec -setwdelay. When you run the command, it will prompt you for 3 
 values to use. If you spec 1 0 0, then it will be the same as the 
 default. If you want to test only the first derivative, then you would 
 spec 0 1 0. Note that the 3rd regressor is the 2nd derivative wrt time, 
 not the first derivative wrt the dispersion parameter. You cannot get 
 the Calhoun 2004 value using a contrast (it is non-linear).
 doug
 
 3) The Calhoun et al (2004) approach is being used to combine the 
 three regressors into a derivative boost amplitude 
 measure.  The contrast weights should therefore be specified as -a 1 -c 2.
 
 Thanks for any help you can give me!
 
 Joe
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland
 
 E-mail: jdie...@mac.com mailto:jdie...@mac.com
 Phone: 202-297-8117
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
 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.
 




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 202-297-8117
http://joedien.com//












___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2013-07-09 Thread Joseph Dien
I tried correlations and the 2nd derivative is definitely not orthogonal.  

 corrcoef([X(1:207,4) X(1:207,5) X(1:207,6)])

ans =

1.   -0.   -0.5427
   -0.1.   -0.0298
   -0.5427   -0.02981.

I looked at the regressors that SPM generates for the same data:

ans =

1.0.04360.1740
0.04361.   -0.0226
0.1740   -0.02261.

The first derivative is not as orthogonal but the second derivative was much 
more orthogonal.
Does this have to do with what you noted below about how the second derivative 
is being calculated?
So does this mean I should avoid the spmhrf 2 option entirely to avoid loss of 
statistical power?

Thanks for the help!

Joe


On Jul 9, 2013, at 4:34 PM, Joseph Dien jdie...@mac.com wrote:

 Thanks for the quick response!  So if I wanted to use the Calhoun 2004 
 approach, I should be able to use the Steffener 2010 correction to address 
 the violation of the assumption that the regressors were standardized and 
 generate a new beta.nii.gz file where the primary beta values have been 
 replaced with the Calhoun 2004 measure.  Can I assume the three regressors 
 are more or less orthogonal?  I got non-zero numbers when I tried to test the 
 assumption in the Xtmp.X variable 
 
 sum(X(1:207,4).*X(1:207,5))
 
 but not hugely non-zero so maybe just rounding errors?
 
 
 On Jul 9, 2013, at 4:16 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 07/09/2013 04:11 PM, Joseph Dien wrote:
 Hi,
   I have a question about how mkcontrast-sess works.  I ran an 
 analysis using the mkanalysis-sess option spmhrf 2 so there are three 
 regressors for each predictor, the primary, the latency, and the 
 dispersion.  When specifying the contrast weights for mkcontrast-sess, 
 the documentation indicates that they are specified in terms of the 
 conditions as numbered in the paradigm file, not the individual 
 regressors.  Furthermore there only appears to be one contrast value 
 output for each contrast, not three.
 
 How are the three regressors being handled?  I can think of several 
 scenarios:
 
 1) the contrast weights are not actually in terms of conditions (the 
 documentation is incorrect), they are actually in terms of the 
 regressors (so contrasting conditions 1 and 2 could be specified as -a 
 1 -a 2 -a 3 -c 4 -c 5 -c 6).
 
 2) the latency and dispersion regressors are being ignored (a common 
 practice).  The contrast weights should therefore be specified as -a 1 
 -c 2.
 This is what happens. If you want to use the derivatives, then you need 
 to spec -setwdelay. When you run the command, it will prompt you for 3 
 values to use. If you spec 1 0 0, then it will be the same as the 
 default. If you want to test only the first derivative, then you would 
 spec 0 1 0. Note that the 3rd regressor is the 2nd derivative wrt time, 
 not the first derivative wrt the dispersion parameter. You cannot get 
 the Calhoun 2004 value using a contrast (it is non-linear).
 doug
 
 3) The Calhoun et al (2004) approach is being used to combine the 
 three regressors into a derivative boost amplitude 
 measure.  The contrast weights should therefore be specified as -a 1 -c 2.
 
 Thanks for any help you can give me!
 
 Joe
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland
 
 E-mail: jdie...@mac.com mailto:jdie...@mac.com
 Phone: 202-297-8117
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
 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.
 
 
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland 
 
 E-mail: jdie...@mac.com
 Phone: 202-297-8117
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer

Re: [Freesurfer] FSFAST ocn vs. cluster outputs

2013-06-14 Thread Joseph Dien
Ah never mind, I figured it out.  tksurfer was automatically setting the range 
to go from 2-5 so cluster 1 was not getting displayed.  So please convert this 
question to a user suggestion to automatically set the threshold setting to the 
full range when displaying ocn and cluster overlays (as the default threshold 
was also the reason the suparmarginal gyrus cluster was not being displayed).

Cheers!

Joe

On Jun 15, 2013, at 12:07 AM, Joseph Dien jdie...@mac.com wrote:

 I'm getting some puzzling discrepancies when comparing the ocn and the 
 cluster outputs.  The summary file indicates there should be five significant 
 clusters (see below).  
 The cluster file only shows four of the clusters, although I'm guessing that 
 the supramarginal one is not being displayed because it did not pass the 
 three-space Bonferroni (so the cluster file only includes clusters that pass 
 that additional correction)?  What is really confusing me is that the ocn 
 file does display the supramarginal cluster but does not show the rostral 
 anterior cingulate cluster.  How does this work?  See attached images below.
 
 This is with Freesurfer 5.20 on OS X 10.8.3.
 
 Cheers!
 
 Joe
 
 
 tksurfer fsaverage lh inflated -aparc -overlay 
 CPA.sm05.lh/CS-v-OTHERS/CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.ocn.nii.gz
 tksurfer fsaverage lh inflated -aparc -overlay 
 CPA.sm05.lh/CS-v-OTHERS/CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.cluster.nii.gz
 
 # Cluster Growing Summary (mri_surfcluster)
 # $Id: mri_surfcluster.c,v 1.51.2.3 2012/05/31 22:10:05 greve Exp $
 # $Id: mrisurf.c,v 1.693.2.4 2012/11/07 22:38:00 nicks Exp $
 # CreationTime 2013/05/26-22:53:59-GMT
 # cmdline mri_surfcluster --in CS-v-OTHERS.wls/osgm/sig.nii.gz --csd 
 /Applications/freesurfer/average/mult-comp-cor/fsaverage/lh/cortex/fwhm12/pos/th20/mc-z.csd
  --mask CS-v-OTHERS.wls/mask.nii.gz --cwsig 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.cluster.nii.gz --vwsig 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.voxel.nii.gz --sum 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.cluster.summary --ocn 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.ocn.nii.gz --oannot 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.ocn.annot --annot aparc --csdpdf 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.pdf.dat --cwpvalthresh .05 --o 
 CS-v-OTHERS.wls/osgm/cache.th20.pos.sig.masked.nii.gz --no-fixmni 
 --bonferroni 3 --surf white 
 # cwd /Volumes/Data/CP1/fsfast/secondLevel/CPA.sm05.lh/CS-v-OTHERS
 # sysname  Darwin
 # hostname megajoe.home
 # machine  x86_64
 # FixVertexAreaFlag 1
 # FixSurfClusterArea 1
 # 
 # Input  CS-v-OTHERS.wls/osgm/sig.nii.gz
 # Frame Number  0
 # srcsubj fsaverage
 # hemi lh
 # surface white
 # annot aparc
 # SUBJECTS_DIR /Applications/freesurfer/subjects
 # SearchSpace_mm2 65416.6
 # SearchSpace_vtx 148649
 # Bonferroni 3
 # Minimum Threshold 2
 # Maximum Threshold infinity
 # Threshold Signpos
 # AdjustThreshWhenOneTail 1
 # CW PValue Threshold: 0.05 
 # Area Threshold0 mm^2
 # CSD thresh  2.00
 # CSD nreps1
 # CSD simtype  null-z
 # CSD contrast NA
 # CSD confint  90.00
 # Overall max 5.96965 at vertex 140670
 # Overall min -3.06064 at vertex 162717
 # NClusters  5
 # Total Cortical Surface Area 65416.6 (mm^2)
 # FixMNI = 0
 # 
 # ClusterNo  Max   VtxMax   Size(mm^2)  MNIX   MNIY   MNIZCWPCWPLow   
  CWPHi   NVtxs   Annot
15.970  140670   2209.93 -5.9   40.9   -0.0  0.00030  0.0  
 0.00060  4223  rostralanteriorcingulate
24.146   49359   1566.01 -4.0  -19.8   35.8  0.00030  0.0  
 0.00060  3668  posteriorcingulate
33.860  111375446.35-44.6  -37.3   25.1  0.02558  0.02204  
 0.02911  1037  supramarginal
43.711  128614652.01-24.4  -26.8  -24.3  0.00150  0.00060  
 0.00240  1539  parahippocampal
53.647   25172   1334.99-48.7  -50.3   17.3  0.00030  0.0  
 0.00060  2700  inferiorparietal
  
 
 
 
 question5.jpg
 
 
 
 
 
 On May 31, 2013, at 4:44 PM, Joseph Dien jdie...@mac.com wrote:
 
 It looks like the corrected vertex p-values (ex: 
 cache.th13.abs.sig.voxel.nii.gz) are only available for the surface-based lh 
 and rh spaces.  For the subcortical volume-based analysis I don't see the 
 corresponding corrected voxel p-values being available?
 
 On May 31, 2013, at 2:46 PM, Joseph Dien jdie...@mac.com wrote:
 
 
 On May 31, 2013, at 12:11 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu 
 wrote:
 
 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly good at this point but 
 I have a remaining question:
 
 I assume the contents of sig.nii.gz (which I assume are the vertex 
 p-values) are not FWE corrected.  Is it possible to get FWE-corrected 
 vertex p-values?  Or are only clusterwise corrections available?
 There should be something like cache.th13.abs.sig.voxel.mgh which is 
 corrected on a voxelwise basis (the th13 is just part of the name but it 
 should be the same regardless of the threshold you

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-05-31 Thread Joseph Dien

On May 31, 2013, at 12:09 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 On 05/30/2013 04:37 PM, Joseph Dien wrote:
 Just to make sure I'm doing this right, I'm going to summarize what 
 I've taken away from your answers and to ask some new questions. In 
 order to present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to 
 show the % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition 
 where the cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot 
 from the group level analysis to generate a mask for each cluster of 
 interest.
 Then I could extract the value of the voxels from each 
 subject's cespct file for each contrast, average them across the 
 cluster ROI, then average them across each subject, to generate the 
 histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 I don't understand. If you don't have a cluster for a contrast, how are 
 you defining the cluster? From another contrast?
 

Well, what the reviewer told me to do is if I present a figure with a 
significant cluster for one condition, I should use that as an ROI to calculate 
the %age signal change for all four conditions and present it as a bar chart as 
part of the figure.  I think she wanted to be able to get a more qualitative 
sense of the data patterns.

 
 2) A results table with the headings:
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from 
 the cache.th20.pos/neg.sig.cluster.summary files from the group level 
 analysis.
 I can get the peak voxel coordinates from the summary files as well.
 I can use this to get the peak voxel p from the group level sig.nii.gz 
 file.  Is this FWE corrected?  If not, how can I get this information?
 What do you mean? The cluster p-value is corrected, why do you need the 
 max p and why does it need to be corrected?

Well, as I understand it, the drawback of clusterwise statistics is that while 
it assures you that the cluster passes muster as not being due to random chance 
(at 95% confidence), it doesn't provide any assurances at the voxel level (or 
in this case the vertex level) as it is likely that a cluster is composed of 
both signal and noise and you don't know which part is which.  So if a cluster 
covers both BA44 and BA45 (for example), you can't be sure whether the 
activation involves BA44, BA45, or both.  A voxelwise correction is more 
conservative but if it provides significance, it does allow for this kind of 
interpretation.

 I can use these coordinates to get the peak voxel T by getting the 
 value from the group level F.nii.gz file and taking its square root. 
 How can I get the sign of the T statistic?
 Same as the sign of gamma.mgh

Ah, great!

 I can use the Lancaster transform to convert the MNI305 peak voxel 
 coordinates into the Atlas coordinates to look up the putative BA and 
 landmarks (unless there is a better way with Freesurfer?  I'm seeing 
 some references to some BA labels in the forum but it doesn't look 
 like this is a complete set yet?).
 Some of the BA labels are in FS, but not nearly all of them
 doug

No problem!  I worked out that I can use the talairach.nii file made available 
by the Talairach Daemon folks.


 
 Sorry for all these questions!  I got some nice results from FSFAST 
 and would like to get them written up.
 
 Cheers!
 
 Joe
 
 
 
 
 On May 29, 2013, at 10:53 PM, Douglas Greve gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 5/29/13 10:42 PM, Joseph Dien wrote:
 
 On May 29, 2013, at 11:40 AM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 Hi Joe,
 
 On 05/29/2013 01:00 AM, Joseph Dien wrote:
 I need to extract the beta weights from a cluster identified with
 FS-Fast in order to compute percentage signal change.
 
 1) I see a file called beta.nii.gz that appears to have the beta
 weight information.  It has a four dimensional structure and the
 fourth dimension appears to be the beta weights.  Is there an index
 somewhere as to which beta weight is which?  Or if not, how are they
 organized?
 For the first level analysis, the first N beta weights correspond 
 to the
 N conditions in the paradigm file. The rest are nuisance variables.
 
 
 Ah, very good!  In order to compute the percent signal change 
 statistic (I'm following the MarsBaR approach: 
 http://marsbar.sourceforge.net/faq.html#how-is-the-percent-signal-change-calculated)
  
 I'm also going to need the beta weights for the session mean 
 regressors.  How are the nuisance regressors organized?
 You can just use the meanfunc.nii.gz. Also, each contrasts is 
 computed as the simple contrast (ces) and as a percent

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-05-31 Thread Joseph Dien

On May 31, 2013, at 12:11 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly good at this point but 
 I have a remaining question:
 
 I assume the contents of sig.nii.gz (which I assume are the vertex 
 p-values) are not FWE corrected.  Is it possible to get FWE-corrected 
 vertex p-values?  Or are only clusterwise corrections available?
 There should be something like cache.th13.abs.sig.voxel.mgh which is 
 corrected on a voxelwise basis (the th13 is just part of the name but it 
 should be the same regardless of the threshold you choose)
 doug

Excellent!  Thanks!  :)

 
 Thanks again for your patience!
 
 Joe
 
 On May 30, 2013, at 4:37 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com wrote:
 
 Just to make sure I'm doing this right, I'm going to summarize what 
 I've taken away from your answers and to ask some new questions. In 
 order to present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to 
 show the % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition 
 where the cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot 
 from the group level analysis to generate a mask for each cluster of 
 interest.
 Then I could extract the value of the voxels from each 
 subject's cespct file for each contrast, average them across the 
 cluster ROI, then average them across each subject, to generate the 
 histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 
 2) A results table with the headings:
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from 
 the cache.th20.pos/neg.sig.cluster.summary files from the group level 
 analysis.
 I can get the peak voxel coordinates from the summary files as well.
 I can use this to get the peak voxel p from the group 
 level sig.nii.gz file.  Is this FWE corrected?  If not, how can I get 
 this information?
 I can use these coordinates to get the peak voxel T by getting the 
 value from the group level F.nii.gz file and taking its square root. 
 How can I get the sign of the T statistic?
 I can use the Lancaster transform to convert the MNI305 peak voxel 
 coordinates into the Atlas coordinates to look up the putative BA and 
 landmarks (unless there is a better way with Freesurfer?  I'm seeing 
 some references to some BA labels in the forum but it doesn't look 
 like this is a complete set yet?).
 
 Sorry for all these questions!  I got some nice results from FSFAST 
 and would like to get them written up.
 
 Cheers!
 
 Joe
 
 
 
 
 On May 29, 2013, at 10:53 PM, Douglas Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 5/29/13 10:42 PM, Joseph Dien wrote:
 
 On May 29, 2013, at 11:40 AM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 Hi Joe,
 
 On 05/29/2013 01:00 AM, Joseph Dien wrote:
 I need to extract the beta weights from a cluster identified with
 FS-Fast in order to compute percentage signal change.
 
 1) I see a file called beta.nii.gz that appears to have the beta
 weight information.  It has a four dimensional structure and the
 fourth dimension appears to be the beta weights.  Is there an index
 somewhere as to which beta weight is which?  Or if not, how are they
 organized?
 For the first level analysis, the first N beta weights correspond 
 to the
 N conditions in the paradigm file. The rest are nuisance variables.
 
 
 Ah, very good!  In order to compute the percent signal change 
 statistic (I'm following the MarsBaR approach: 
 http://marsbar.sourceforge.net/faq.html#how-is-the-percent-signal-change-calculated)
  
 I'm also going to need the beta weights for the session mean 
 regressors.  How are the nuisance regressors organized?
 You can just use the meanfunc.nii.gz. Also, each contrasts is 
 computed as the simple contrast (ces) and as a percent of the 
 baseline at the voxel (cespct, cesvarpct).
 
 2) In order to extract the cluster, it looks like I would
 use mri_label2vol to convert cache.th20.neg.sig.ocn.annot into a
 volume where the voxels are tagged with the number of the
 corresponding cluster.
 Is that  from a group analysis?
 
 
 Yes, that's right.
 
 I could then use that to generate masks to extract the information I
 need for each cluster from beta.nii.gz.
 If this is from a group analysis, then there should already be a file
 there (something.y.ocn.dat) that has a value for each subject in the
 rows and a value for each cluster in the columns.
 
 
 I see it.  Are these values already scaled as percent signal 
 change?  If so, that would be wonderful!  :)
 Only if you specified it when you ran

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-05-31 Thread Joseph Dien
It looks like the corrected vertex p-values (ex: 
cache.th13.abs.sig.voxel.nii.gz) are only available for the surface-based lh 
and rh spaces.  For the subcortical volume-based analysis I don't see the 
corresponding corrected voxel p-values being available?

On May 31, 2013, at 2:46 PM, Joseph Dien jdie...@mac.com wrote:

 
 On May 31, 2013, at 12:11 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu 
 wrote:
 
 
 On 05/31/2013 01:49 AM, Joseph Dien wrote:
 I was able to make more progress so I'm mostly good at this point but 
 I have a remaining question:
 
 I assume the contents of sig.nii.gz (which I assume are the vertex 
 p-values) are not FWE corrected.  Is it possible to get FWE-corrected 
 vertex p-values?  Or are only clusterwise corrections available?
 There should be something like cache.th13.abs.sig.voxel.mgh which is 
 corrected on a voxelwise basis (the th13 is just part of the name but it 
 should be the same regardless of the threshold you choose)
 doug
 
 Excellent!  Thanks!  :)
 
 
 Thanks again for your patience!
 
 Joe
 
 On May 30, 2013, at 4:37 PM, Joseph Dien jdie...@mac.com 
 mailto:jdie...@mac.com wrote:
 
 Just to make sure I'm doing this right, I'm going to summarize what 
 I've taken away from your answers and to ask some new questions. In 
 order to present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to 
 show the % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition 
 where the cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot 
 from the group level analysis to generate a mask for each cluster of 
 interest.
 Then I could extract the value of the voxels from each 
 subject's cespct file for each contrast, average them across the 
 cluster ROI, then average them across each subject, to generate the 
 histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 
 2) A results table with the headings:
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from 
 the cache.th20.pos/neg.sig.cluster.summary files from the group level 
 analysis.
 I can get the peak voxel coordinates from the summary files as well.
 I can use this to get the peak voxel p from the group 
 level sig.nii.gz file.  Is this FWE corrected?  If not, how can I get 
 this information?
 I can use these coordinates to get the peak voxel T by getting the 
 value from the group level F.nii.gz file and taking its square root. 
 How can I get the sign of the T statistic?
 I can use the Lancaster transform to convert the MNI305 peak voxel 
 coordinates into the Atlas coordinates to look up the putative BA and 
 landmarks (unless there is a better way with Freesurfer?  I'm seeing 
 some references to some BA labels in the forum but it doesn't look 
 like this is a complete set yet?).
 
 Sorry for all these questions!  I got some nice results from FSFAST 
 and would like to get them written up.
 
 Cheers!
 
 Joe
 
 
 
 
 On May 29, 2013, at 10:53 PM, Douglas Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 5/29/13 10:42 PM, Joseph Dien wrote:
 
 On May 29, 2013, at 11:40 AM, Douglas N Greve 
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote:
 
 Hi Joe,
 
 On 05/29/2013 01:00 AM, Joseph Dien wrote:
 I need to extract the beta weights from a cluster identified with
 FS-Fast in order to compute percentage signal change.
 
 1) I see a file called beta.nii.gz that appears to have the beta
 weight information.  It has a four dimensional structure and the
 fourth dimension appears to be the beta weights.  Is there an index
 somewhere as to which beta weight is which?  Or if not, how are they
 organized?
 For the first level analysis, the first N beta weights correspond 
 to the
 N conditions in the paradigm file. The rest are nuisance variables.
 
 
 Ah, very good!  In order to compute the percent signal change 
 statistic (I'm following the MarsBaR approach: 
 http://marsbar.sourceforge.net/faq.html#how-is-the-percent-signal-change-calculated)
  
 I'm also going to need the beta weights for the session mean 
 regressors.  How are the nuisance regressors organized?
 You can just use the meanfunc.nii.gz. Also, each contrasts is 
 computed as the simple contrast (ces) and as a percent of the 
 baseline at the voxel (cespct, cesvarpct).
 
 2) In order to extract the cluster, it looks like I would
 use mri_label2vol to convert cache.th20.neg.sig.ocn.annot into a
 volume where the voxels are tagged with the number of the
 corresponding cluster.
 Is that  from a group analysis?
 
 
 Yes, that's right.
 
 I could then use that to generate masks to extract the information I
 need for each cluster from beta.nii.gz

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-05-30 Thread Joseph Dien
Just to make sure I'm doing this right, I'm going to summarize what I've taken 
away from your answers and to ask some new questions. In order to present the 
results, I need two things:

1) A set of histograms (with error bars) for each cluster figure to show the % 
signal change for each of the four contrasts of interest.
The cache.th20.pos.y.ocn.dat file only gives it for the condition where the 
cluster was significant so I can't use that.
So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot from the 
group level analysis to generate a mask for each cluster of interest.
Then I could extract the value of the voxels from each subject's cespct file 
for each contrast, average them across the cluster ROI, then average them 
across each subject, to generate the histogram?
This would suffice to give me the %age signal change?
I would be doing these computations in Matlab using MRIread.

2) A results table with the headings: 

Cluster p (FWE corrected)
Cluster size
Peak Voxel p (FWE corrected)
Peak Voxel T
Peak Voxel Coords
BA
Anatomical Landmark

I can get the first two from the cache.th20.pos/neg.sig.cluster.summary files 
from the group level analysis.
I can get the peak voxel coordinates from the summary files as well.
I can use this to get the peak voxel p from the group level sig.nii.gz file.  
Is this FWE corrected?  If not, how can I get this information?
I can use these coordinates to get the peak voxel T by getting the value from 
the group level F.nii.gz file and taking its square root.  How can I get the 
sign of the T statistic?
I can use the Lancaster transform to convert the MNI305 peak voxel coordinates 
into the Atlas coordinates to look up the putative BA and landmarks (unless 
there is a better way with Freesurfer?  I'm seeing some references to some BA 
labels in the forum but it doesn't look like this is a complete set yet?).

Sorry for all these questions!  I got some nice results from FSFAST and would 
like to get them written up.

Cheers!

Joe




On May 29, 2013, at 10:53 PM, Douglas Greve gr...@nmr.mgh.harvard.edu wrote:

 
 On 5/29/13 10:42 PM, Joseph Dien wrote:
 
 On May 29, 2013, at 11:40 AM, Douglas N Greve gr...@nmr.mgh.harvard.edu 
 wrote:
 
 Hi Joe,
 
 On 05/29/2013 01:00 AM, Joseph Dien wrote:
 I need to extract the beta weights from a cluster identified with 
 FS-Fast in order to compute percentage signal change.
 
 1) I see a file called beta.nii.gz that appears to have the beta 
 weight information.  It has a four dimensional structure and the 
 fourth dimension appears to be the beta weights.  Is there an index 
 somewhere as to which beta weight is which?  Or if not, how are they 
 organized?
 For the first level analysis, the first N beta weights correspond to the 
 N conditions in the paradigm file. The rest are nuisance variables.
 
 
 Ah, very good!  In order to compute the percent signal change statistic (I'm 
 following the MarsBaR approach: 
 http://marsbar.sourceforge.net/faq.html#how-is-the-percent-signal-change-calculated)
  I'm also going to need the beta weights for the session mean regressors.  
 How are the nuisance regressors organized?
 You can just use the meanfunc.nii.gz. Also, each contrasts is computed as the 
 simple contrast (ces) and as a percent of the baseline at the voxel (cespct, 
 cesvarpct).
 
 2) In order to extract the cluster, it looks like I would 
 use mri_label2vol to convert cache.th20.neg.sig.ocn.annot into a 
 volume where the voxels are tagged with the number of the 
 corresponding cluster.
 Is that  from a group analysis?
 
 
 Yes, that's right.
 
 I could then use that to generate masks to extract the information I 
 need for each cluster from beta.nii.gz.
 If this is from a group analysis, then there should already be a file 
 there (something.y.ocn.dat) that has a value for each subject in the 
 rows and a value for each cluster in the columns.
 
 
 I see it.  Are these values already scaled as percent signal change?  If so, 
 that would be wonderful!  :)
 Only if you specified it when you ran isxconcat-sess. Note that the 
 non-scaled values are actually scaled to percent of grand mean intensity.
 
 Is that correct?
 
 3) The final information that I would need is the canonical hrf shape 
 generated by FSFAST for a single event.  I guess I could generate that 
 by setting up a dummy analysis run with a single event of the desired 
 duration and then look in the X variable in the resulting X.mat file?
 try this
 plot(X.runflac(1).flac.ev(2).tirf, X.runflac(1).flac.ev(2).Xirf)
 
 
 Perfect!  :)
 
 Sorry for all the questions!
 
 Joe
 
 
 
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland
 
 E-mail: jdie...@mac.com mailto:jdie...@mac.com
 Phone: 301-226-8848
 Fax: 301-226-8811
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer

[Freesurfer] MRIread generating one dimensional vector

2013-05-30 Thread Joseph Dien
I tried using MRIread to look at the contents of the analysis files (using 
Fressurfer 5.2.0 under OS X 10.8.3 and Matlab 2013a):

mri = MRIread('ces.nii.gz',0);

but I'm getting one-dimensional vectors:

 mri

mri = 

   srcbext: ''
analyzehdr: []
  bhdr: []
   vol: [1x163842 double]
  niftihdr: [1x1 struct]
 fspec: 'ces.nii.gz'
   pwd: '/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/CS-v-OTHERS'
flip_angle: 0
tr: 2000
te: 0
ti: 0
  vox2ras0: [4x4 double]
   volsize: [1 163842 1]
height: 1
 width: 163842
 depth: 1
   nframes: 1
   vox2ras: [4x4 double]
   nvoxels: 163842
 xsize: 1.
 ysize: 1.
 zsize: 1.
   x_r: -0.
   x_a: 0.0067
   x_s: -0.0150
   y_r: 4.1714e-08
   y_a: 0.9131
   y_s: 0.4078
   z_r: -0.0164
   z_a: -0.4077
   z_s: 0.9130
   c_r: -6.8259e+04
   c_a: 465.0319
   c_s: -995.9002
  vox2ras1: [4x4 double]
   Mdc: [3x3 double]
volres: [1. 1. 1.]
tkrvox2ras: [4x4 double]

It's fine when I read one of the functional files (f.nii.gz).
Am I doing something wrong?  Or if it is supposed to be like this, how do I 
convert to XYZ coordinates?  The vox2ras fields are expecting a 
four-dimensional matrix.

Thanks!

Joe



Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] MRIread generating one dimensional vector

2013-05-30 Thread Joseph Dien
Oh duh.  Okay, thanks!

Joe

On May 30, 2013, at 5:38 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 That is a surface file. Each of the 163842 values corresponds to a vertex in 
 the surface. If you want xyz, you need to load in the surface. You can also 
 analyze the data in the native space if that would make it easier (but you 
 can't surface smooth).
 doug
 
 
 On 05/30/2013 05:08 PM, Joseph Dien wrote:
 I tried using MRIread to look at the contents of the analysis files (using 
 Fressurfer 5.2.0 under OS X 10.8.3 and Matlab 2013a):
 
 mri = MRIread('ces.nii.gz',0);
 
 but I'm getting one-dimensional vectors:
 
  mri
 
 mri =
 
 srcbext: ''
 analyzehdr: []
 bhdr: []
 vol: [1x163842 double]
 niftihdr: [1x1 struct]
 fspec: 'ces.nii.gz'
 pwd: '/Volumes/Data/CP1/fsfast/CPA003/bold/CPA.sm05.lh/CS-v-OTHERS'
 flip_angle: 0
 tr: 2000
 te: 0
 ti: 0
 vox2ras0: [4x4 double]
 volsize: [1 163842 1]
 height: 1
 width: 163842
 depth: 1
 nframes: 1
 vox2ras: [4x4 double]
 nvoxels: 163842
 xsize: 1.
 ysize: 1.
 zsize: 1.
 x_r: -0.
 x_a: 0.0067
 x_s: -0.0150
 y_r: 4.1714e-08
 y_a: 0.9131
 y_s: 0.4078
 z_r: -0.0164
 z_a: -0.4077
 z_s: 0.9130
 c_r: -6.8259e+04
 c_a: 465.0319
 c_s: -995.9002
 vox2ras1: [4x4 double]
 Mdc: [3x3 double]
 volres: [1. 1. 1.]
 tkrvox2ras: [4x4 double]
 
 It's fine when I read one of the functional files (f.nii.gz).
 Am I doing something wrong?  Or if it is supposed to be like this, how do I 
 convert to XYZ coordinates?  The vox2ras fields are expecting a 
 four-dimensional matrix.
 
 Thanks!
 
 Joe
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland
 
 E-mail: jdie...@mac.com mailto:jdie...@mac.com
 Phone: 301-226-8848
 Fax: 301-226-8811
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 
 
 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.
 




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] beta weights from FS-Fast analysis

2013-05-30 Thread Joseph Dien
I was able to make more progress so I'm mostly good at this point but I have a 
remaining question:

I assume the contents of sig.nii.gz (which I assume are the vertex p-values) 
are not FWE corrected.  Is it possible to get FWE-corrected vertex p-values?  
Or are only clusterwise corrections available?

Thanks again for your patience!

Joe

On May 30, 2013, at 4:37 PM, Joseph Dien jdie...@mac.com wrote:

 Just to make sure I'm doing this right, I'm going to summarize what I've 
 taken away from your answers and to ask some new questions. In order to 
 present the results, I need two things:
 
 1) A set of histograms (with error bars) for each cluster figure to show the 
 % signal change for each of the four contrasts of interest.
 The cache.th20.pos.y.ocn.dat file only gives it for the condition where the 
 cluster was significant so I can't use that.
 So I could use mri_label2vol to convert cache.th20.neg.sig.ocn.annot from the 
 group level analysis to generate a mask for each cluster of interest.
 Then I could extract the value of the voxels from each subject's cespct file 
 for each contrast, average them across the cluster ROI, then average them 
 across each subject, to generate the histogram?
 This would suffice to give me the %age signal change?
 I would be doing these computations in Matlab using MRIread.
 
 2) A results table with the headings: 
 
 Cluster p (FWE corrected)
 Cluster size
 Peak Voxel p (FWE corrected)
 Peak Voxel T
 Peak Voxel Coords
 BA
 Anatomical Landmark
 
 I can get the first two from the cache.th20.pos/neg.sig.cluster.summary files 
 from the group level analysis.
 I can get the peak voxel coordinates from the summary files as well.
 I can use this to get the peak voxel p from the group level sig.nii.gz file.  
 Is this FWE corrected?  If not, how can I get this information?
 I can use these coordinates to get the peak voxel T by getting the value from 
 the group level F.nii.gz file and taking its square root.  How can I get the 
 sign of the T statistic?
 I can use the Lancaster transform to convert the MNI305 peak voxel 
 coordinates into the Atlas coordinates to look up the putative BA and 
 landmarks (unless there is a better way with Freesurfer?  I'm seeing some 
 references to some BA labels in the forum but it doesn't look like this is a 
 complete set yet?).
 
 Sorry for all these questions!  I got some nice results from FSFAST and would 
 like to get them written up.
 
 Cheers!
 
 Joe
 
 
 
 
 On May 29, 2013, at 10:53 PM, Douglas Greve gr...@nmr.mgh.harvard.edu wrote:
 
 
 On 5/29/13 10:42 PM, Joseph Dien wrote:
 
 On May 29, 2013, at 11:40 AM, Douglas N Greve gr...@nmr.mgh.harvard.edu 
 wrote:
 
 Hi Joe,
 
 On 05/29/2013 01:00 AM, Joseph Dien wrote:
 I need to extract the beta weights from a cluster identified with 
 FS-Fast in order to compute percentage signal change.
 
 1) I see a file called beta.nii.gz that appears to have the beta 
 weight information.  It has a four dimensional structure and the 
 fourth dimension appears to be the beta weights.  Is there an index 
 somewhere as to which beta weight is which?  Or if not, how are they 
 organized?
 For the first level analysis, the first N beta weights correspond to the 
 N conditions in the paradigm file. The rest are nuisance variables.
 
 
 Ah, very good!  In order to compute the percent signal change statistic 
 (I'm following the MarsBaR approach: 
 http://marsbar.sourceforge.net/faq.html#how-is-the-percent-signal-change-calculated)
  I'm also going to need the beta weights for the session mean regressors.  
 How are the nuisance regressors organized?
 You can just use the meanfunc.nii.gz. Also, each contrasts is computed as 
 the simple contrast (ces) and as a percent of the baseline at the voxel 
 (cespct, cesvarpct).
 
 2) In order to extract the cluster, it looks like I would 
 use mri_label2vol to convert cache.th20.neg.sig.ocn.annot into a 
 volume where the voxels are tagged with the number of the 
 corresponding cluster.
 Is that  from a group analysis?
 
 
 Yes, that's right.
 
 I could then use that to generate masks to extract the information I 
 need for each cluster from beta.nii.gz.
 If this is from a group analysis, then there should already be a file 
 there (something.y.ocn.dat) that has a value for each subject in the 
 rows and a value for each cluster in the columns.
 
 
 I see it.  Are these values already scaled as percent signal change?  If 
 so, that would be wonderful!  :)
 Only if you specified it when you ran isxconcat-sess. Note that the 
 non-scaled values are actually scaled to percent of grand mean intensity.
 
 Is that correct?
 
 3) The final information that I would need is the canonical hrf shape 
 generated by FSFAST for a single event.  I guess I could generate that 
 by setting up a dummy analysis run with a single event of the desired 
 duration and then look in the X variable in the resulting X.mat file?
 try this
 plot(X.runflac(1).flac.ev(2).tirf, X.runflac(1

Re: [Freesurfer] beta weights from FS-Fast analysis

2013-05-29 Thread Joseph Dien

On May 29, 2013, at 11:40 AM, Douglas N Greve gr...@nmr.mgh.harvard.edu wrote:

 Hi Joe,
 
 On 05/29/2013 01:00 AM, Joseph Dien wrote:
 I need to extract the beta weights from a cluster identified with 
 FS-Fast in order to compute percentage signal change.
 
 1) I see a file called beta.nii.gz that appears to have the beta 
 weight information.  It has a four dimensional structure and the 
 fourth dimension appears to be the beta weights.  Is there an index 
 somewhere as to which beta weight is which?  Or if not, how are they 
 organized?
 For the first level analysis, the first N beta weights correspond to the 
 N conditions in the paradigm file. The rest are nuisance variables.
 

Ah, very good!  In order to compute the percent signal change statistic (I'm 
following the MarsBaR approach: 
http://marsbar.sourceforge.net/faq.html#how-is-the-percent-signal-change-calculated)
 I'm also going to need the beta weights for the session mean regressors.  How 
are the nuisance regressors organized?

 2) In order to extract the cluster, it looks like I would 
 use mri_label2vol to convert cache.th20.neg.sig.ocn.annot into a 
 volume where the voxels are tagged with the number of the 
 corresponding cluster.
 Is that  from a group analysis?
 

Yes, that's right.

 I could then use that to generate masks to extract the information I 
 need for each cluster from beta.nii.gz.
 If this is from a group analysis, then there should already be a file 
 there (something.y.ocn.dat) that has a value for each subject in the 
 rows and a value for each cluster in the columns.
 

I see it.  Are these values already scaled as percent signal change?  If so, 
that would be wonderful!  :)

 Is that correct?
 
 3) The final information that I would need is the canonical hrf shape 
 generated by FSFAST for a single event.  I guess I could generate that 
 by setting up a dummy analysis run with a single event of the desired 
 duration and then look in the X variable in the resulting X.mat file?
 try this
 plot(X.runflac(1).flac.ev(2).tirf, X.runflac(1).flac.ev(2).Xirf)
 

Perfect!  :)

 Sorry for all the questions!
 
 Joe
 
 
 
 
 
 
 Joseph Dien,
 Senior Research Scientist
 University of Maryland
 
 E-mail: jdie...@mac.com mailto:jdie...@mac.com
 Phone: 301-226-8848
 Fax: 301-226-8811
 http://joedien.com//
 
 
 
 
 
 
 
 
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
 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.
 




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] SUMA and FSFAST

2013-05-28 Thread Joseph Dien
I was wondering if someone could give me a summary as to how SUMA and FSFAST 
differ?  In other words, user interface aside, what would be reasons to use one 
or the other?

Joe




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


[Freesurfer] beta weights from FS-Fast analysis

2013-05-28 Thread Joseph Dien
I need to extract the beta weights from a cluster identified with FS-Fast in 
order to compute percentage signal change.  

1) I see a file called beta.nii.gz that appears to have the beta weight 
information.  It has a four dimensional structure and the fourth dimension 
appears to be the beta weights.  Is there an index somewhere as to which beta 
weight is which?  Or if not, how are they organized?

2) In order to extract the cluster, it looks like I would use mri_label2vol to 
convert cache.th20.neg.sig.ocn.annot into a volume where the voxels are tagged 
with the number of the corresponding cluster.

I could then use that to generate masks to extract the information I need for 
each cluster from beta.nii.gz.

Is that correct?

3) The final information that I would need is the canonical hrf shape generated 
by FSFAST for a single event.  I guess I could generate that by setting up a 
dummy analysis run with a single event of the desired duration and then look in 
the X variable in the resulting X.mat file?

Sorry for all the questions!

Joe






Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] v5.2.0 preproc-sess failing on 3dvolreg.afni

2013-05-21 Thread Joseph Dien
.**harvard.edu/fswiki/**BugReportinghttp://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
  
  FileDrop:
  
  www.nmr.mgh.harvard.edu/**facility/filedrop/index.htmlhttp://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
  
  http://www.nmr.mgh.harvard.**edu/facility/filedrop/index.**htmlhttp://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
  
  http://www.nmr.mgh.harvard.**edu/facility/filedrop/index.**
  html http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 
  Outgoing:
  ftp://surfer.nmr.mgh.harvard.**edu/transfer/outgoing/flat/**
  greve/ ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
  __**_
  Freesurfer mailing list
  Freesurfer@nmr.mgh.harvard.edu
  
  mailto:freesur...@nmr.mgh.**harvard.eduFreesurfer@nmr.mgh.harvard.edu
  
  
  mailto:freesur...@nmr.mgh.**harvard.eduFreesurfer@nmr.mgh.harvard.edu
 
  
  mailto:freesur...@nmr.mgh.**harvard.eduFreesurfer@nmr.mgh.harvard.edu
  
 
  
  https://mail.nmr.mgh.harvard.**edu/mailman/listinfo/**freesurferhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
  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/**compliancelinehttp://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.
 
 
 
  -- Douglas N. Greve, Ph.D.
  MGH-NMR Center
  gr...@nmr.mgh.harvard.edu 
  mailto:gr...@nmr.mgh.harvard.**edugr...@nmr.mgh.harvard.edu
  
  Phone Number: 617-724-2358 tel:617-724-2358
  Fax: 617-726-7422 tel:617-726-7422
 
  Bugs: 
  surfer.nmr.mgh.harvard.edu/**fswiki/BugReportinghttp://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
  
  http://surfer.nmr.mgh.**harvard.edu/fswiki/**BugReportinghttp://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
  
  FileDrop: 
  www.nmr.mgh.harvard.edu/**facility/filedrop/index.htmlhttp://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
  
  http://www.nmr.mgh.harvard.**edu/facility/filedrop/index.**htmlhttp://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
  
  Outgoing:
  
  ftp://surfer.nmr.mgh.harvard.**edu/transfer/outgoing/flat/**greve/ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 
 
  --
  Douglas N. Greve, Ph.D.
  MGH-NMR Center
  gr...@nmr.mgh.harvard.edu
  Phone Number: 617-724-2358
  Fax: 617-726-7422
 
  Bugs: 
  surfer.nmr.mgh.harvard.edu/**fswiki/BugReportinghttp://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
  FileDrop: 
  www.nmr.mgh.harvard.edu/**facility/filedrop/index.htmlhttp://www.nmr.mgh.harvard.edu/facility/filedrop/index.html
  Outgoing: ftp://surfer.nmr.mgh.harvard.**edu/transfer/outgoing/flat/**
  greve/ ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
 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.




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com//











___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.


Re: [Freesurfer] mkbrainmask-sess

2013-05-20 Thread Joseph Dien
I imagine this issue has been solved by now but just for the record I ran into 
a similar issue.  In my case the problem turned out to be that FSL installs by 
default in /usr/local/fsl/bin but FSFAST was looking for it in /bin

This was on OS X 10.8.2 with FSL Installer - Version 2.0.10 and Freesurfer 
5.2.0.

Is there some way to set up Freesurfer so it'll look in the correct directory?  
For now I'm copying the critical files to /bin but am hoping there is a better 
solution.

Thanks!

Joe


 It could be. It uses fsl only to create a mask of the brain, so it probably 
 does not need a full fsl install, but it might need more than you have.
 doug
 
 On 3/25/12 7:05 AM, Kiley Seymour wrote:
 Hi again,
 Could this error be due to the fact that I don't have a full version
 of fsl installed and configured on my ubuntu virtual machine? i.e.
 does fsfast require fsl to be installed?
 
 Thanks
 
 K
 
 
 *From:* Kiley Seymour kiley_seym...@yahoo.com.au
 *To:* freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu
 *Sent:* Friday, 23 March 2012 3:04 PM
 *Subject:* mkbrainmask-sess
 
 Dear Freesurfers,
 
 I am currently trying to do some retinotopic mapping. I have been successful 
 in running the reconstruction commands and setting everything up for the 
 analysis, but I have run into problems when using the selxavg3-sess command. 
 i.e. selxavg3-sess -a rtopy.self.lh -s IFEE2211 -no-preproc ( -no-preproc 
 since I have co-registered and motion corrected my files in SPM).
 I was unable to run this command as freesurfer could not 
 find/media/sf_DATA1/RETINOTOPY/IFEE2211/bold/001/global.meanval.dat
 So I ran mktemplate - sess, which was successfully completed. And then I ran 
 mkbrainmask-sess (see below).
 Any help with this would be much appreciated.
 
 Thanks
 
 Kiley
 
 FreeSurfer:~/data1/RETINOTOPY mkbrainmask-sess -s IFEE2211 
 -d~/data1/RETINOTOPY
 
 /media/sf_DATA1/RETINOTOPY/IFEE2211
 Fri Mar 23 09:42:26 EDT 2012
 mkbrainmask -i template.nii.gz -o masks/brain.nii.gz -thresh 0.1 -ndil 1 
 -nerode 0
 FSLMATHS fslmaths.fsl
 Scratch Dir is /tmp/mkbrainmask_7930
 /media/sf_DATA1/RETINOTOPY/IFEE2211/bold
 mri_convert template.nii.gz /tmp/mkbrainmask_7930/in.nii
 mri_convert template.nii.gz /tmp/mkbrainmask_7930/in.nii
 $Id: mri_convert.c,v 1.179.2.1 2011/03/22 16:37:02 nicks Exp $
 reading from template.nii.gz...
 TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
 i_ras = (-0.998558, -0.0534653, -0.00482299)
 j_ras = (-0.0536701, 0.992375, 0.110955)
 k_ras = (0.00114604, -0.111054, 0.993814)
 writing to /tmp/mkbrainmask_7930/in.nii...
 # -- Using FSL's BET to Extract Brain-- #
 /media/sf_DATA1/RETINOTOPY/IFEE2211/bold
 bet.fsl /tmp/mkbrainmask_7930/in.nii /tmp/mkbrainmask_7930/brain -m -f 0.1
 /home/virtualuser/freesurfer/bin/bet.fsl: 150: /bin/remove_ext: not found
 /home/virtualuser/freesurfer/bin/bet.fsl: 151: /bin/remove_ext: not found
 /home/virtualuser/freesurfer/bin/bet.fsl: 158: /bin/imtest: not found
 [: 158: =: unexpected operator
 /home/virtualuser/freesurfer/bin/bet.fsl: 380: /bin/bet2: not found
 mri_binarize --i /tmp/mkbrainmask_7930/brain_mask.nii --min .01 
 --o/tmp/mkbrainmask_7930/brain_mask.nii
 niiRead(): error opening file /tmp/mkbrainmask_7930/brain_mask.nii
 
 $Id: mri_binarize.c,v 1.26.2.1 2011/04/08 15:40:50 greve Exp $
 cwd /media/sf_DATA1/RETINOTOPY/IFEE2211/bold
 cmdline mri_binarize --i /tmp/mkbrainmask_7930/brain_mask.nii --min .01 --o 
 /tmp/mkbrainmask_7930/brain_mask.nii
 sysname  Linux
 hostname FreeSurfer
 machine  i686
 user virtualuser
 
 input  /tmp/mkbrainmask_7930/brain_mask.nii
 frame  0
 nErode3d   0
 nErode2d   0
 output /tmp/mkbrainmask_7930/brain_mask.nii
 Binarizing based on threshold
 min0.01
 max+infinity
 binval1
 binvalnot 0
 
 
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
 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.




Joseph Dien,
Senior Research Scientist
University of Maryland 

E-mail: jdie...@mac.com
Phone: 301-226-8848
Fax: 301-226-8811
http://joedien.com