Fork me on GitHub

PyHRF package

PyHRF is a set of tools for within-subject fMRI data analysis, which focuses on the characterization of the hemodynamics.

Within the chain of fMRI data processing, these tools provide alternatives to the classical within-subject GLM estimation step. The inputs are preprocessed within-subject data and the outputs are statistical maps and/or fitted HRFs.

The package is mainly written in Python and provides the implementation of the two following methods:

  • The joint-detection estimation (JDE) approach, which divides the brain into functionally homogeneous regions and provides one HRF estimate per region as well as response levels specific to each voxel and each experimental condition. This method embeds a temporal regularization on the estimated HRFs and an adaptive spatial regularization on the response levels.
  • The Regularized Finite Impulse Response (RFIR) approach, which provides HRF estimates for each voxel and experimental conditions. This method embeds a temporal regularization on the HRF shapes, but proceeds independently across voxels (no spatial model).

Check the PyHRF website for details.

class pyhrf.Verbose(verbosity=0, log=<open file '<stdout>', mode 'w'>)

Bases: pyhrf._verbose.Verbose

This is a dummy class implementing the original Verbose class.

This is only to be able to raise a warning when one uses this old implementation.

old_to_new_log_dict = {0: 30, 1: 20, 2: 20, 3: 20, 4: 20, 5: 10, 6: 10}