Skip to content

Correct sign in phase trekking for motion - #205

Merged
J-Endres merged 1 commit into
mainfrom
motion
Nov 3, 2026
Merged

J-Endres merged 1 commit into
mainfrom
motion

Conversation

@SWeinmueller

Copy link
Copy Markdown
Collaborator

The sign for the motion phase is different between signal model and state trekking:
Compare

rot = torch.exp(-2j * np.pi * (
(adc_dist_traj[:, 3:] * data.B0) +
(adc_dist_traj[:, :3] @ data.voxel_pos.T) +
adc_motion_phase

with

dist.mag = dist.mag * torch.exp(2j * np.pi * motion_phase[-1, :])
dist.kt_vec = dist_traj[-1]

@github-actions

Copy link
Copy Markdown

Simulation test: main (before) vs. this PR (after)

Sequence Status max mag NRMSE max phase RMSE max runtime Δ
mr0_DREAM_STE_seq ✅ 0.00e+00 0.00e+00 +8.8%
mr0_DWI_SE_EPI ✅ 0.00e+00 0.00e+00 +1.1%
mr0_EPI_2D_seq ✅ 0.00e+00 0.00e+00 +2.0%
mr0_FID_seq ✅ 0.00e+00 0.00e+00 +2.6%
mr0_FLASH_2D_seq ✅ 0.00e+00 0.00e+00 +19.6%
mr0_GRE_to_FLASH ⚠️ – – –
mr0_RARE_2D_seq ✅ 0.00e+00 0.00e+00 +11.3%
mr0_SE_CPMG_seq ❌ 0.00e+00 0.00e+00 +27.4%
mr0_STE_3pulses_5echoes_seq ✅ 6.86e-09 1.49e-08 +3.5%
mr0_TSE_2D_multi_shot_seq ✅ 0.00e+00 0.00e+00 +0.6%
mr0_bSSFP_2D_seq ✅ 0.00e+00 0.00e+00 +9.1%
mr0_diffusion_prep_STEAM_2D_seq ✅ 0.00e+00 0.00e+00 +8.4%
✅ mr0_DREAM_STE_seq: All tests passed.

mr0_DREAM_STE_seq

✅ mr0_DWI_SE_EPI: All tests passed.

mr0_DWI_SE_EPI

✅ mr0_EPI_2D_seq: All tests passed.

mr0_EPI_2D_seq

✅ mr0_FID_seq: All tests passed.

mr0_FID_seq

✅ mr0_FLASH_2D_seq: All tests passed.

mr0_FLASH_2D_seq

⚠️ mr0_GRE_to_FLASH: No comparison possible: [Errno 2] No such file or directory: '/home/runner/work/MRzero-Core/MRzero-Core/tests/simulation_test/ref_files/mr0_GRE_to_FLASH.seq.npz'
✅ mr0_RARE_2D_seq: All tests passed.

mr0_RARE_2D_seq

❌ mr0_SE_CPMG_seq: Runtime deviation too high (27.37%) at acc=0.01000

mr0_SE_CPMG_seq

✅ mr0_STE_3pulses_5echoes_seq: All tests passed.

mr0_STE_3pulses_5echoes_seq

✅ mr0_TSE_2D_multi_shot_seq: All tests passed.

mr0_TSE_2D_multi_shot_seq

✅ mr0_bSSFP_2D_seq: All tests passed.

mr0_bSSFP_2D_seq

✅ mr0_diffusion_prep_STEAM_2D_seq: All tests passed.

mr0_diffusion_prep_STEAM_2D_seq

Workflow run — raw .npz data is attached as artifacts.

@J-Endres
J-Endres merged commit 6ef2bed into main Nov 3, 2026
32 of 33 checks passed
@J-Endres
J-Endres deleted the motion branch November 3, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants