8000 hrf model onset bug? · Issue #306 · nipy/nipy · GitHub
[go: up one dir, main page]

Skip to content

hrf model onset bug? #306

Open
Open

Description

@bpinsard

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, 

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.

Activity

  1. bthirion commented on Feb 6, 2014

    @bthirion
    Contributor

    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, > |

    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

  2. bpinsard commented on Feb 6, 2014

    @bpinsard
    Author

    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

  3. bthirion commented on Feb 6, 2014

    @bthirion
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0