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", nPix=256, nAcq=None)
lstArrK = []
for k0, arrGrad, k1 in lstK0GradK1:
    arrK = k0 + mag.integrate(arrGrad, dtGrad=10e-6, dtAdc=2.5e-6)
    lstArrK.append(arrK)

Solve for the Density Compensation Function

lstArrDcf = mad.solve(nPix=256, lstArrK=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.3

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.3
File Size Uploaded Provenance Actions
mrarbdcf-3.0.3.tar.gz 12.9 kB Without provenance Details for mrarbdcf-3.0.3.tar.gz

Release files / mrarbdcf-3.0.3.tar.gz

Download URL mrarbdcf-3.0.3.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
35de274c69a3e962ca26a6f2b3ae488a6f7e47bda9b47d20845d0dcb9364b318
BLAKE2b-256 checksum
How to use checksums
0c679f1017831c6444a356b0a256dbae22c73068fe44aeaef518c0644ce1c0bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for MRArbDcf 3.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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