MRzero Core
The MRzero Core contains the core functionality of MRzero like MRI sequence building, simulation and reconstruction. MRzero Core does not force you to take any particular approach to e.g., reconstruction, as it targets easy integration in existing projects. Nevertheless, more tools can be added in the future if they helpful for the general application space.
🎉 1.0 release
Version 1.0 adds Pulseq 1.5 support and flips the sign convention of the simulated signal, so that it is now the complex conjugate of what previous versions returned. Reconstruction accordingly switches from
ffttoifft.See the FFT sign conventions page for details, and the CHANGELOG for the full list of changes. If anything else broke, please open an issue.
Usage
MRzero Core is written in Python, heavily relying on PyTorch for fast (GPU-) Tensor calculations. To improve performance, parts of the simulation are written in Rust and compiled for x86 Windows and Linux, other platforms are currently not supported.
Install with pip:
pip install MRzeroCore
The typical way of using it is like the following:
import MRzeroCore as mr0
Examples on how to use MR-zero can be found in the Playground.
Pulseq Integration
MRzero Core makes Pulseq simulation incredibly easy - simulate any .seq file in just one line:
import MRzeroCore as mr0
# Simulate any Pulseq file
seq = mr0.Sequence.import_file("your_sequence.seq")
signal = mr0.util.simulate(seq) # That's it!
Key Features:
- One-line simulation of any Pulseq .seq file
- PyPulseq integration - write sequences in Python, simulate with MR-zero
- Google Colab ready - 13+ ready-to-run examples
- MATLAB ↔ Python workflow - create in MATLAB Pulseq, simulate in Python
- No dependencies - fully self-contained Pulseq parser included
- Scanner-ready export - export MR-zero sequences as .seq files
Links
- Documentation: https://mrsources.github.io/MRzero-Core
- Examples: Playground
- PyPI: https://pypi.org/project/mrzerocore/
- Original MRzero Paper: https://arxiv.org/abs/2002.04265
Building from source
This assumes windows as host operating system. For building the python wheel, you need:
- the Rust toolchain: rustup
- the rust-python build tool tool: pip install maturin
- for Linux crosscompilation: docker
- to build the documentation: mdBook
Building for Windows
maturin build --interpreter python
Building for Linux
docker run --rm -v <path-to-repo>/MRzero-Core:/io ghcr.io/pyo3/maturin build
Building the documentation
Install newest (beta) version of mdBook:
cargo install --git https://github.com/rust-lang/mdBook.git mdbook
Run a live-preview server:
# in the root directory:
mdbook serve documentation
Official builds
The python wheels hosted by PyPI is built as described above. It is deployed as GitHub action (see pypi_publish.yml)
Release files for mrzerocore 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mrzerocore-1.0.7.tar.gz | 75.9 MB | Details |
Built distributions (wheels)
Total release size:84.5 MB
Release files / mrzerocore-1.0.7.tar.gz
| Download URL | mrzerocore-1.0.7.tar.gz |
|---|---|
| Size | 75.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca76e5ac61b4dfb1cccb19a5beae76adffd76c703bc5d3b8ea940930e27d6c76
|
|
BLAKE2b-256 checksum How to use checksums |
a6a60004d603e87428f1e78f0eee040594fa7e9f8a8f0de80025b79957f5fa16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-win_amd64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 474.6 kB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3bedbfd06f2caf692c639d989af7f7ebfe3d7569085d9cc7a180ef81ac29880a
|
|
BLAKE2b-256 checksum How to use checksums |
b2c4d96a7ac015f425de969d46116db2d4dadd3e9e63fe324035f152a0d3a9a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-win32.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-win32.whl |
|---|---|
| Size | 457.9 kB |
| Tags | CPython 3.7 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
8fb4b4b78c66f5a33ea28875076f19caf857e17214797f1b779b03d07bc6e36d
|
|
BLAKE2b-256 checksum How to use checksums |
b6690d265031bca22cbcc4530b31f350aa4d0d04a1ad9039303986eae1c15ee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_x86_64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 771.8 kB |
| Tags | CPython 3.7 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
eef90e54807295c4b9648fbdefe2ef3acbadc69e68039633c672a37d78466344
|
|
BLAKE2b-256 checksum How to use checksums |
a7c5459746f17e169926fd08b757fbaf5d8b4b05b6b390f4306b258bd32c3fa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_i686.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_i686.whl |
|---|---|
| Size | 812.8 kB |
| Tags | CPython 3.7 Linux musl 1.2+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
b761955077e7e72dd67ac50de666f75c043516ee3261bda6a757e1f94a6dffdc
|
|
BLAKE2b-256 checksum How to use checksums |
b41ecb2b1c68084ba9388c102781473a811908745383d676c70a439052120285
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_armv7l.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 822.8 kB |
| Tags | CPython 3.7 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
a80f1d8633cfdd1955305002d977f067c9725c3bb49b78813d3f4685b490055c
|
|
BLAKE2b-256 checksum How to use checksums |
70c6c3dd3ba71f7e2ec78b166de36dcc79f860891333810dab6228d8108afaa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_aarch64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 716.1 kB |
| Tags | CPython 3.7 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6a5341b5e464fec496b7b7019585cf0fc2c576a0c289ef57c58c0a2395885b54
|
|
BLAKE2b-256 checksum How to use checksums |
3ff8750ae687b091989023c5c85b655f55297acd3366fb5451f029bae4468bdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 562.5 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
554797fb01d946db7904af1a2691ed8a5ebf24ed0d0ced908df7f1a48ddba6f4
|
|
BLAKE2b-256 checksum How to use checksums |
c88a7574b1e41675bc8a26be817ac7b8c9f6169b35751ab407f5aa245600293d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 620.4 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ IBM System/390x abi3 |
|
SHA-256 checksum How to use checksums |
0dfbb54c2fa4051cdc94fee2972ae8c61438b084d1ab7dde36a8dadcb43b257a
|
|
BLAKE2b-256 checksum How to use checksums |
672e659de2676fd43e035f53757336f6259c26e24da2780e10d28e2c0f967871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 672.3 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
ddacb4ab51361616874bb629fbc28ec043e7ef59df703301a233ab733c6c34fd
|
|
BLAKE2b-256 checksum How to use checksums |
60360e2f4a731a27cedab8ea0ef74ed1cc96dd9df14e90a1d93c5db5e2fbfa2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 544.9 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
a6e1999fb8c1f4918e8d15e6e72a1e739933b2ae9531bff2eaa879ffc4b92fc1
|
|
BLAKE2b-256 checksum How to use checksums |
880bd1a8dd3c2480192c652e241bd3aeca27c9bb1ff4ceb9635afb4973f9b630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 538.4 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
f580e0c6a34e0c208460eb76bf5f9cded27b419471d38ee85059807c49a0eb1e
|
|
BLAKE2b-256 checksum How to use checksums |
1b397ed562cc657622de1733150fe9042f988411c17ea731905154dd0b805d64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 606.1 kB |
| Tags | CPython 3.7 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
1ece6dc511e9b42b25438b0857f7bc381943ac734bea5d183af8877ed9b8b8c1
|
|
BLAKE2b-256 checksum How to use checksums |
ee8a3810305081bd377920451edd671b29a6bd1d2c1c20560a736c23d410b99c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-macosx_11_0_arm64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 514.3 kB |
| Tags | CPython 3.7 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c3992284dbc5e471fc256e25b9f87568215a5ce94a4b80de27e1c9574822e6ff
|
|
BLAKE2b-256 checksum How to use checksums |
03ff9bb512c5340827e7d1550881c81657c326cfb5f33a18cc3e9ba0891e6db5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mrzerocore-1.0.7-cp37-abi3-macosx_10_12_x86_64.whl
| Download URL | mrzerocore-1.0.7-cp37-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 528.7 kB |
| Tags | CPython 3.7 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
09517fcdefb048f7c184c5ef73951c7b4e8fcc9e44aef6f9d65753b03fba4b4e
|
|
BLAKE2b-256 checksum How to use checksums |
120b240cc2bb6f0c7db07a0142b022d5fea242b68ab62bfab93e9ec93c3169b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|