Thank you so much Doug! I just have one more question:
Before convolving regressors with HRF, I looked at X matrix and noticed that the values of regressors have been changed/scaled. For example, the original values in a regressor file are:
134.8300
0
141.1200
0
91.5310
0
96.1870
0
But they have been apparently shifted by a constant value in the X matrix:
91.8168
-43.0132
98.1068
-43.0132
48.5178
-43.0132
53.1738
-43.0132
Why is there such a change in the regressor values?
Thanks,
Reza
You can use the following matlab code. You can ignore the warning
printed after the toepliz operation. The OriginalRegressor should be a
vector of length Ntp, then write out the NewRegressor to a new external
regressor file.
TR=2; % seconds
Ntp=100;
t = TR*[0:Ntp-1]';
h = fast_spmhrf(t);
a = zeros(Ntp,1); a(1) = 1;
X = toeplitz(h,a);
NewRegressor = X*OriginalRegressor;
On 02/21/2017 04:02 PM, Reza Rajimehr wrote:
> Hi Doug,
>
> Since our external regressors are stimulus-related (e.g. mean
> luminance of stimuli), we need to convolve them with a hemodynamic
> response function. In mkanalysis-sess, we have used -spmhrf 0 to model
> conditions. Is there a code or Matlab script for HRF convolution, so
> that we apply exactly the same spmhrf function for modeling the
> external regressors?
>
> Thanks,
> Reza
>
> No, they are not
>
>
> On 02/17/2017 05:09 PM, Reza Rajimehr wrote:
> >/During the functional analysis in FS-FAST, are the external regressors />/convolved with the hemodynamic response function? />//>/Thanks, />/Reza />//>//>/_______________________________________________ />/Freesurfer mailing list />/Freesurfer at nmr.mgh.harvard.edu
> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer> />/https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer /
> --
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> greve at nmr.mgh.harvard.edu
> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer>
> 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
> 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/
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
greve at 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/