Table Of Contents

Previous topic

modalities.fmri.functions

Next topic

modalities.fmri.pca

This Page

modalities.fmri.hrf

Module: modalities.fmri.hrf

Inheritance diagram for nipy.modalities.fmri.hrf:

This module provides definitions of various hemodynamic response functions (hrf).

In particular, it provides Gary Glover’s canonical HRF, AFNI’s default HRF, and a spectral HRF.

SpectralHRF

class nipy.modalities.fmri.hrf.SpectralHRF(input_hrf=<nipy.modalities.fmri.filters.Filter object at 0xa6072ac>, spectral=True, ncomp=2, names=[, 'glover'], deriv=False, **keywords)

Bases: nipy.modalities.fmri.filters.Filter

Delay filter with spectral or Taylor series decomposition for estimating delays.

Liao et al. (2002).

__init__(input_hrf=<nipy.modalities.fmri.filters.Filter object at 0xa6072ac>, spectral=True, ncomp=2, names=[, 'glover'], deriv=False, **keywords)
Parameters:
input_hrf : TODO

TODO

spectral : bool

TODO

ncomp : int

TODO

names : TODO

TODO

deriv : bool

TODO

keywords : dict

passed as keyword arguments to filters.Filter.__init__

deltaPCA(tmax=50.0, lower=-15.0, delta=None)

Perform an expansion of fn, shifted over the values in delta. Effectively, a Taylor series approximation to fn(t+delta), in delta, with basis given by the filter elements. If fn is None, it assumes fn=IRF[0], that is the first filter.

>>> GUI = True
>>> import numpy as np
>>> from pylab import plot, title, show
>>> from nipy.modalities.fmri.hrf import glover, glover_deriv, SpectralHRF
>>>
>>> ddelta = 0.25
>>> delta = np.arange(-4.5,4.5+ddelta, ddelta)
>>> time = np.arange(0,20,0.2)
>>>
>>> hrf = SpectralHRF(glover)
>>>
>>> taylor = hrf.deltaPCA(delta=delta)
>>> curplot = plot(time, taylor.components[1](time))
>>> curplot = plot(time, taylor.components[0](time))
>>> curtitle=title('Shift using Taylor series -- components')
>>> show()
>>>
>>> curplot = plot(delta, taylor.coef[1](delta))
>>> curplot = plot(delta, taylor.coef[0](delta))
>>> curtitle = title('Shift using Taylor series -- coefficients')
>>> show()
>>>
>>> curplot = plot(delta, taylor.inverse(delta))
>>> curplot = plot(taylor.coef[1](delta) / taylor.coef[0](delta), delta)
>>> curtitle = title('Shift using Taylor series -- inverting w1/w0')
>>> show()
nipy.modalities.fmri.hrf.glover2GammaDENS(peak_hrf, fwhm_hrf)
Parameters:
peak_hfr : TODO

TODO

fwhm_hrf : TODO

TODO

Returns:

TODO