Metadata-Version: 2.4
Name: gemprf
Version: 0.1.12
Summary: A Python library for population receptive field (pRF) analysis
Author-email: Siddharth Mittal <siddharth.mittal@meduniwien.ac.at>
License: BSD 3-Clause License
Project-URL: Homepage, https://gemprf.github.io/
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: h5py==3.13.0
Requires-Dist: joblib==1.4.2
Requires-Dist: matplotlib==3.10.1
Requires-Dist: nibabel==5.3.2
Requires-Dist: numba==0.61.0
Requires-Dist: numba_kdtree==0.6.0
Requires-Dist: numpy==2.1.3
Requires-Dist: nvidia_ml_py==12.570.86
Requires-Dist: pandas==2.2.3
Requires-Dist: pynvml==12.0.0
Requires-Dist: scipy==1.15.2
Requires-Dist: xmltodict==0.14.2
Requires-Dist: lxml==5.3.0
Dynamic: license-file

# GEM-pRF

Welcome to **GEM-pRF**, a standalone, GPU-accelerated tool for population receptive field (pRF) mapping, built for **large-scale fMRI analysis**.

For theory and full method details, see our paper:

👉 *Mittal et al. (2025):*  **GEM-pRF: GPU-Empowered Mapping of Population Receptive Fields for Large-Scale fMRI Analysis**
<https://doi.org/10.1016/j.media.2025.103891>


## Documentation

* Documentation and examples are available at: <https://gemprf.github.io/>

* For a deeper look into the mathematical and computational foundations, the paper above is the best reference.


## Installation

GEM-pRF relies on an NVIDIA GPU and CUDA. Make sure your system has:

* A compatible **NVIDIA GPU**
* A matching **CUDA toolkit**
* A matching **NVCC compiler**

### 1. Install GEM-pRF

```bash
pip install gemprf
```

Latest versions:
<https://pypi.org/project/gemprf/>

### 2. Install CuPy (required)

GEM-pRF depends on CuPy, but CuPy must match your CUDA version — so it is **not installed automatically**.

Install the correct CuPy wheel for your system:

* <https://docs.cupy.dev/en/stable/install.html#installing-cupy>
* or via pip, for example:

```bash
pip install cupy-cuda12x
```



>[!Caution]
Install the CuPy variant that matches *your* CUDA version.

You must install CuPy **before running GEM-pRF**.


## Running GEM-pRF

After installing `gemprf` and a compatible CuPy build, you can run GEM-pRF directly from Python.

### Example

```python
import gemprf as gp

gp.run("path/to/your_config.xml")
```

### Configuration files

GEM-pRF uses XML configuration files to define analysis settings.
See a sample config here:

<https://github.com/siddmittal/GEMpRF_Demo/blob/main/sample_configs/sample_config.xml>


---

## Quick workflow

1. Install GEM-pRF → `pip install gemprf`
2. Install the correct CuPy for your CUDA environment
3. Prepare your XML config file
4. Run:

   ```python
   import gemprf as gp
   gp.run("config.xml")
   ```


