Skip to main content

Magnetic Resonance Arbitrary Gradient Toolbox (MRArbGrad, MAG)

Introduction

This toolbox is a pip package with C++ backend. The pip package can be called via Python interface to generate non-Cartesian gradient waveforms for built-in and external trajectories. The C++ source code (in mrarbgrad_src/ext/) can be ported to other pulse sequence project like UIH's Adept project for gradient waveform calculation.

Install

Optionally, to create a new conda environment (in case the dependencies in this package break your current environment), please run:

$ conda create -n magtest -y
$ conda activate magtest
$ conda install python==3.12 -y

This package is NOT restricted to use Python 3.12. Feel free to adjust at your convenience, just if the package works.

To install this package from PyPI:

$ pip install mrarbgrad

To install this package from a local repository:

$ bash install.bash

You can also install via pip install . but remember to delete *.egg-info or pip will run into bug when uninstalling this package in current folder (see comments in install.bash).

Examples & Usages

Examples for generating gradient waveforms for either built-in trajectory (trajectory library) or external trajectory (expressed by trajectory function or trajectory samples) can be found in the example folder.

Reference

If this project helps you, please cite our paper:

[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;1–12.

Release files for MRArbGrad 4.4.1

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 4.4.1
File Size Uploaded
mrarbgrad-4.4.1.tar.gz 111.4 kB Details

Release files / mrarbgrad-4.4.1.tar.gz

Download URL mrarbgrad-4.4.1.tar.gz
Size 111.4 kB
Tags Source
SHA-256 checksum
How to use checksums
48d6896c4b53f53a6b65e0117e8240743df08cb9b27db97b6d3b3377bd281687
BLAKE2b-256 checksum
How to use checksums
4c99c9a3094bd547fc4bac6d6b3f73ebdc9e3e58660508fdc5ca0c02aaa3d2a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

4.4.1 This release

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