Skip to content

fix: align isochromat_sim B1, normalized_grads, r2 spin_dist, and inf nyquist with PDG - #212

Open
chenyangsu wants to merge 1 commit into
MRsources:mainfrom
chenyangsu:fix/isochromat-sim-b1-grads-r2
Open

chenyangsu wants to merge 1 commit into
MRsources:mainfrom
chenyangsu:fix/isochromat-sim-b1-grads-r2

Conversation

@chenyangsu

Copy link
Copy Markdown

With B1=1j (complex64) and a 90° FID pulse, isochromat_sim returns 0.0+0j while execute_graph(fid_graph(seq), ...) returns ~1.0, because flip() evaluates cos(angle * B1) on complex B1 (and raises RuntimeError for pTx). isochromat_sim also skips seq.normalized_grads scaling, stacks spin_dist="r2" on dim=0 instead of dim=1, and leaves voxel_size=0 when nyquist=inf.

Align isochromat_sim with main_pass.py for complex/pTx B1 and grad_scale, fix spin_dist="r2" and isinf(nyquist), and add tests/test_isochromat_sim.py. Happy to split these into separate PRs if you prefer.

Testing: pytest -q tests/test_isochromat_sim.py (5 passed; all 5 fail on main), ruff check tests/test_isochromat_sim.py clean.

This branch has not been deployed

No deployments
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.

1 participant