From 489433639df985d61d933519f063015c77b622dd Mon Sep 17 00:00:00 2001 From: fglang <43142740+fglang@users.noreply.github.com> Date: Fri, 27 Feb 2026 17:59:39 +0100 Subject: [PATCH 1/2] fixed bug of custom voxel phantom for more than 1 voxel (#163) Co-authored-by: Felix Glang --- python/MRzeroCore/phantom/custom_voxel_phantom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/MRzeroCore/phantom/custom_voxel_phantom.py b/python/MRzeroCore/phantom/custom_voxel_phantom.py index 26d5bf0..3737f4a 100644 --- a/python/MRzeroCore/phantom/custom_voxel_phantom.py +++ b/python/MRzeroCore/phantom/custom_voxel_phantom.py @@ -170,11 +170,11 @@ def generate_maps(self, props) -> list[torch.Tensor]: kspaces = [torch.zeros(128, 128, dtype=torch.cfloat) for _ in range(len(props))] # Iterate over all voxels and render them into the kspaces - for pos in self.voxel_pos: + for j, pos in enumerate(self.voxel_pos): rot = torch.exp(-2j*pi * (trajectory @ pos)) for i in range(len(props)): - kspaces[i] += props[i] * (rot * dephasing).view(128, 128) + kspaces[i] += props[i][j] * (rot * dephasing).view(128, 128) # FFT the rendered k-spaces to get the maps norm = self.voxel_size[0] * self.voxel_size[1] # 2D plot, ignore thickness From 97b57a28352aa2706a9f8b4c9ac10f4cfc9dd886 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 27 Feb 2026 18:06:14 +0100 Subject: [PATCH 2/2] update version to 0.4.6 --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- Cargo.toml | 2 +- pyproject.toml | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e1b781..3fa8219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +- 0.4.6 + - Small bugfixes + - restrict pypulseq dependency to < 1.5.0 - 0.4.5 - Fix: NIfTI loader supports `int` constants - Fix: Empty tissue masks in `VoxelGridPhantom` diff --git a/Cargo.lock b/Cargo.lock index 0ccb144..99ac838 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "mrzero_core" -version = "0.4.5" +version = "0.4.6" dependencies = [ "num-complex", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index f249026..dade8c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mrzero_core" -version = "0.4.5" +version = "0.4.6" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/pyproject.toml b/pyproject.toml index d9bb704..85efeea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "mrzerocore" -version = "0.4.5" +version = "0.4.6" description = "Core functionality of MRzero" authors = [ {name = "Jonathan Endres", email = "jonathan.endres@uk-erlangen.de"}, @@ -21,7 +21,7 @@ dependencies = [ "ismrmrd", "matplotlib>=3.5", "pydisseqt>=0.1.13", - "pypulseq", + "pypulseq<1.5.0", "requests>=2.20", "scikit-image", "scipy>=1.7",