Skip to main content

Optimize hemodynamic response function parameters.

A free & open source package for finding best-fitting hemodynamic response function (HRF) parameters for fMRI data. Optimization takes place within the framework of population receptive field (pRF) parameters.

The fitting process requires, for every voxel of fMRI data, optimized pRF parameters. These can be obtained using pyprf_feature.

Installation

For installation, follow these steps:

  1. (Optional) Create conda environment

conda create -n env_hrf_opt python=2.7
source activate env_hrf_opt
conda install pip
  1. Clone repository

git clone https://github.com/MSchnei/hrf_opt.git
  1. Install hrf_opt with pip

pip install /path/to/cloned/hrf_opt

How to use

1. Run pyprf_feature to obtain an initial guess of the pRF parameters

See here for more information on how to use pyprf_feature. In brief, open a terminal and run:

pyprf_feature -config path/to/custom_pRF_config.csv

2. Obtain model responses for every voxel for best-fitting pRF model

When pyprf_feature is done, run it again with -save_tc and -mdl_rsp flag. This will save the fitted pRF model time courses and corresponding neural responses to disk:

pyprf_feature -config path/to/custom_pRF_config.csv -save_tc -mdl_rsp

3. Adjust the csv file for hrf_opt

Adjust the information in the config_default.csv file in the hrf_opt folder, such that the provided information is correct. It is recommended to make a specific copy of the csv file for every subject.

4. Run hrf_opt

Open a terminal and run:

hrf_opt -config path/to/custom_hrf_opt_config.csv

References

This application is based on the following work:

  • Dumoulin, S. O., & Wandell, B. A. (2008). Population receptive field estimates in human visual cortex. NeuroImage, 39(2), 647–660. https://doi.org/10.1016/j.neuroimage.2007.09.034

  • Harvey, B. M., & Dumoulin, S. O. (2011). The Relationship between Cortical Magnification Factor and Population Receptive Field Size in Human Visual Cortex: Constancies in Cortical Architecture. Journal of Neuroscience, 31(38), 13604–13612. https://doi.org/10.1523/JNEUROSCI.2572-11.2011

License

The project is licensed under GNU General Public License Version 3.

Release files for hrf_opt 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hrf_opt 1.0.3
File Size Uploaded
hrf_opt-1.0.3.tar.gz 14.5 kB Details

Release files / hrf_opt-1.0.3.tar.gz

Download URL hrf_opt-1.0.3.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b6a80e4ce638aa7c062a3c97a476abec6221f2288e3e346a17249bef68464833
BLAKE2b-256 checksum
How to use checksums
6928e34ea684e646ec315172a15410a05f2d1db102534e1617e84062b8bef37d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page