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.
Bases: nipy.modalities.fmri.filters.Filter
Delay filter with spectral or Taylor series decomposition for estimating delays.
Liao et al. (2002).
Parameters: |
|
---|
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()
Parameters: |
|
---|---|
Returns: | TODO |