GeneRalized Autocalibrating Partially Parallel Acquisitions.
Project description
Installation
pip install pygrappa
Usage
The function is called with undersampled k-space data and calibration data (usually a fully sampled portion of the center of k-space). The unsampled points in k-space should be exactly 0:
from pygrappa import grappa
sx, sy, ncoils = kspace.shape[:]
cx, cy, ncoils = calib.shape[:]
res = grappa(kspace, calib, kernel_size=(5, 5), coil_axis=-1)
sx, sy, ncoils = res.shape[:]
If calibration data is in the k-space data, simply extract it:
from pygrappa import grappa
sx, sy, ncoils = kspace.shape[:] # center 20 lines are ACS
ctr, pd = int(sy/2), 10
calib = kspace[:, ctr-pd:ctr+pad, :].copy()
res = grappa(kspace, calib, kernel_size=(5, 5), coil_axis=-1)
sx, sy, ncoils = res.shape[:]
Also see the examples module.
A very similar experimental GRAPPA implementation with the same interface can be called:
from pygrappa import cgrappa
res = cgrappa(kspace, calib, kernel_size=(5, 5), coil_axis=-1)
This function uses much of the same code as the Python grappa() implementation, but has certain parts written in C++ and all compiled using Cython. It runs about twice as fast but is considered experimental.
About
GRAPPA is a popular parallel imaging reconstruction algorithm. Unfortunately there aren’t a lot of easy to use Python implementations available, so I decided to release this simple one.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pygrappa-0.3.8.tar.gz.
File metadata
- Download URL: pygrappa-0.3.8.tar.gz
- Upload date:
- Size: 142.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86b8ae78e41fe454e58e2f9d6954760f6ada576c08743a430f3836cd450320ff
|
|
| MD5 |
91de0d0a14d75a1ac63e9989fdfed619
|
|
| BLAKE2b-256 |
b1570148d1fee533eadf0768ebc9659256d2905ad53c3141dabbb06acbef7034
|