Non-Cartesian MRI Gradient Waveform Toolbox (MRArbGrad)
Python library for designing the gradient waveforms for arbitrary MRI trajectories.
The trajectories can be specified as a Python function, or as a set of k-space points. A trajectory library is also provided. The underlying C/C++ code can be ported to compatible pulse sequence projects for fast gradient waveform design.
How to use
Install
$ pip install mrarbgrad
Import Libraries
from numpy import *
import mrarbgrad as mag
Define Your Trajectory Function
def Rosette(t):
rho = 0.5 * sin(5*pi*t)
phi = 3*pi*t
return rho*array([cos(phi), sin(phi)])
Solve for the Gradient Waveform
grad = mag.solve(Rosette, pmin=0, pmax=1)
pmin and pmax define the bounds of the function parameter t. grad[:,0], grad[:,1], and grad[:,2] are the x-, y-, and z-axis gradient waveforms, respectively.
For more usages such as specifying the hardware constraints, use of the trajectory library and other utilities, please refer to the Examples.
Acknowledgements
The algorithm in this library is proposed in:
[1] Luo R, Huang H, Miao Q, Xu J, Hu P, Qi H. Real-Time Gradient Waveform Design for Arbitrary k-Space Trajectories. IEEE Transactions on Biomedical Engineering. 2026 Oct;73(10):3491-502. doi:10.1109/TBME.2026.3654117
Metadata
Release files for MRArbGrad 5.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mrarbgrad-5.1.3.tar.gz | 107.7 kB | Details |
Release files / mrarbgrad-5.1.3.tar.gz
| Download URL | mrarbgrad-5.1.3.tar.gz |
|---|---|
| Size | 107.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6285299830a72006ffe280d633e2ed583561a12fc8016fe4255c78dc6ef9dfa
|
|
BLAKE2b-256 checksum How to use checksums |
580360a73dfb8822c3f70f4bebf4e88eaabf309e156fbaea72f527d83d81107b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|