Skip to main content

Non-Cartesian MRI Density Compensation Toolbox (MRArbDcf)

Python library for solving for the density compensation function (DCF) for arbitrary MRI trajectories.

How to Use

Install

$ pip install mrarbdcf mrarbgrad==5.1.1

Import Libraries

from numpy import *
import mrarbdcf as mad
import mrarbgrad as mag

Generate a Trajecotry

lstK0GradK1 = mag.scan("Cones", 256, nAcq=None)
lstArrK = []
for k0, arrGrad, k1 in lstK0GradK1:
    arrK = k0 + mag.integrate(arrGrad, 10e-6, 2.5e-6)
    lstArrK.append(arrK)

Solve for the Density Compensation Function

lstArrDcf = mad.solve(256, lstArrK)

Acknowledgements

The algorithm in this library is proposed in:

[1] Luo R, Hu P, Qi H. Sampling Density Compensation using Fast Fourier Deconvolution. In: Proc. Int. Soc. Magn. Reson. Med. [Internet]. 2026 [cited 2026 Apr 28]. Available from: http://echo.ismrm.org/p/ISMRM2026/461-03-015

[2] Luo R, Hu P, Qi H. Sampling Density Compensation using Fast Fourier Deconvolution [Internet]. arXiv; 2025 [cited 2025 Oct 17]. Available from: http://arxiv.org/abs/2510.14873

Additionally, FINUFFT [3,4] and CUFINUFFT [5] are adopted for NUFFT operators in this package.

[3] Barnett AH, Magland J, af Klinteberg L. A Parallel Nonuniform Fast Fourier Transform Library Based on an “Exponential of Semicircle" Kernel. SIAM J Sci Comput. 2019 Jan;41(5):C479–504.

[4] Barnett AH. Aliasing error of the exp(β√(1-z²)) kernel in the nonuniform fast Fourier transform. Applied and Computational Harmonic Analysis. 2021 Mar 1;51:1–16.

[5] Shih Y hsuan, Wright G, Anden J, Blaschke J, Barnett AH. cuFINUFFT: a load-balanced GPU library for general-purpose nonuniform FFTs. 2021 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW). 2021 June;688–97.

Metadata

Release files for MRArbDcf 3.0.2

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

Source distribution (sdist)

Source distribution for MRArbDcf 3.0.2
File Size Uploaded
mrarbdcf-3.0.2.tar.gz 13.0 kB Details

Release files / mrarbdcf-3.0.2.tar.gz

Download URL mrarbdcf-3.0.2.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
afb6fd4c3a4d8016b69cdc21b0939447d5b9eb349e942c200eb06f61e39438fc
BLAKE2b-256 checksum
How to use checksums
7bfe616301f3f7f9299ccd360599096463249428a107cae484a582322656bdb5
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

3.0.3

1 release file

This release

3.0.2 This release

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

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