Repository layout#
Code written for bartorch is under src/, with its tests under tests/ and
its scripts under scripts/; code from other projects is under external/.
Path |
Contents |
|---|---|
|
BART, a Git submodule of the downstream fork |
|
FINUFFT and cuFINUFFT, a Git submodule of upstream |
|
Vendored FFT and Blocks runtime, with their licenses |
|
The C ABI, the only header the Python side sees |
|
Command execution, the in-memory CFL registry, CUDA stream ordering |
|
Operators, the encoding executor, and the configuration of BART’s iterative solve as |
|
Components compiled in place of BART’s: the FINUFFT NUFFT, point spread functions, the FFT and BLAS/LAPACK tables |
|
The Python package; private modules begin with an underscore |
|
Generated from the header and from BART’s command declarations |
|
Scripts run by hand: tests, lint, documentation, generators, device checks, artwork |
|
Build helpers: FINUFFT’s configuration, and the OpenMP runtime the library binds to |
|
The test suite |
|
Documentation sources, the example gallery under |
|
Design records for maintainers, excluded from the built documentation |
|
An earlier pybind11 extension, kept for reference and not built |
The compiled library uses no Python or PyTorch C API. Python passes data
pointers and reversed dimension vectors through ctypes, which is why one wheel
per platform serves every Python and PyTorch version. Changes to BART’s
behaviour are made by replacing a translation unit or by a compile definition,
never by editing the submodule checkout; AGENTS.md lists each replacement.
A change that belongs in BART itself goes to the fork, as The BART fork
describes.
The Python package#
Every public interface is flat: bartorch and each subpackage export their
names from __init__.py, and every module beneath them is private, named
with a leading underscore. tests/test_namespace.py holds this.
Path |
Contents |
|---|---|
|
The array functions and runtime settings re-exported as |
|
One class per operator; |
|
One class per BART iteration, and BART’s regularization terms and denoisers |
|
BART’s reconstructions assembled from operators and solvers |
|
Unrolled iterations and channel conversions, and the DeepInverse adapter |
|
BART’s remaining commands in five sections, and corrections and rigid motion in |
|
The |
|
CFL files, ISMRMRD raw data, DICOM and NIfTI images ( |
|
The ctypes signatures, loading the library, the form of an ABI argument, and a tensor over one of BART’s buffers |
|
Running a command on tensors, what every operator shares, and what the operations on a grid share |
|
The BLAS, LAPACK and FFT sources, and the controls of the NUFFT substitution and of the device |
|
BART’s command declarations, the name of each option, the wrappers built from them, and where each command is exposed or why it is not |
|
BART’s reconstruction commands, private, against which the apps are tested |
Documentation sources#
Path |
Contents |
|---|---|
|
Landing page: the README and the top-level toctree |
|
User and developer guides |
|
Conceptual explanations |
|
Example scripts, one directory per section with its header |
|
API category pages; their tables list the objects |
|
Collects the objects from the API tables into |
|
Templates of the generated object pages |
|
License, related projects, contributors and citation |