Skip to main content

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.4

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

Source distribution (sdist)

Source distribution for MRArbGrad 5.1.4
File Size Uploaded
mrarbgrad-5.1.4.tar.gz 107.7 kB Details

Release files / mrarbgrad-5.1.4.tar.gz

Download URL mrarbgrad-5.1.4.tar.gz
Size 107.7 kB
Tags Source
SHA-256 checksum
How to use checksums
745aae79c15b6a6e903cdcd33c95e987b8e57d8f5bca48747c51348f0975374f
BLAKE2b-256 checksum
How to use checksums
a55bb45ee04a2570090787625f955e25ab873214fa11e2e7e78c7aa27e3326e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

5.1.5

1 release file

This release

5.1.4 This release

1 release file

5.1.3

1 release file

5.1.2

1 release file

5.1.1

1 release file

5.1.0

1 release file

5.0.0

1 release file

4.4.1

1 release file

4.4.0

1 release file

4.3.0

1 release file

4.2.0

1 release file

4.1.1

1 release file

4.1.0

1 release file

4.0.0

1 release file

3.1.0

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.1.0

1 release file

2.0.1

1 release file

1.1.6

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.4

1 release file

1.0.1

1 release file

1.0.0

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