hrf model onset bug? #306

Open
bpinsard opened this Issue Feb 4, 2014 · 3 comments

Comments

Projects
None yet
2 participants

bpinsard commented Feb 4, 2014

Hi all,

trying to use the hrf model module to make regressors with delayed onset:

import nipy.modalities.fmri.hemodynamic_models as hm
tr=2.15
plot(hm.glover_hrf(tr, oversampling=1.,time_length=200*tr, onset=100*tr))

hrf

gave the attached plot, so the expected delay of 100 frames is divided by the tr value, but I also wonder if the scaling of the hrf is correct as it seems that the problem is with this line:
https://github.com/nipy/nipy/blob/master/nipy/modalities/fmri/hemodynamic_models.py#L32

also maybe I am misunderstanding the doc, many thanks @bthirion for some insight on this.

Contributor

bthirion commented Feb 6, 2014

On 04/02/2014 09:47, bpinsard wrote:

Hi all,

trying to use the hrf model module to make regressors with delayed onset:

|import nipy.modalities.fmri.hemodynamic_models as hm
tr=2.15
plot(hm.glover_hrf(tr, oversampling=1.,time_length=200_tr, onset=100_tr))
|

hrf
https://f.cloud.github.com/assets/1155388/2074362/f48c53a0-8d77-11e3-8bd2-e9adbb659f36.png

gave the attached plot, so the expected delay of 100 frames is divided
by the tr value,

 Hi Basile,

yes, the onset is supposed to be in s (sorry, the docstring is
incomplete). The idea is that it had to be a fixed value smaller than 0.

Note that this function should not be used directly. We should
underscore it.
What did you intend to do ?

but I also wonder if the scaling of the hrf is correct as it seems
that the problem is with this line:
https://github.com/nipy/nipy/blob/master/nipy/modalities/fmri/hemodynamic_models.py#L32

also maybe I am misunderstanding the doc, many thanks @bthirion
https://github.com/bthirion for some insight on this.

Could you explain what you mean with the scaling issue ?

Best.

Bertrand

bpinsard commented Feb 6, 2014

ok so it is to be used only as a kernel to regress a block design,
I was using it to create 1 hrf regressor per event.
but what I wasn't understanding is the fact that from time_stamps which units is seconds is subtracted a value in tr : onset (sec) / dt (sec)

thanks

Contributor

bthirion commented Feb 6, 2014

If I get it right, I would specify one condition per trial, when calling
the make_dmtx() function.
HTH

Bertrand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment