Repository navigation
trains: a largest refocusing angle for prescribed trains - #59
Merged
Merged
Conversation
prescribed_flips(maximum_flip=...) bounds every solved angle per train: the kernel takes the angle in [0, maximum] whose echo comes nearest the prescription, and a pulse held at the bound has zero derivative. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MFB6QPbxDLE71AUX5ieZ7n
This was referenced Nov 12, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Matteo · project thread
prescribed_flipstakesmaximum_flip(degrees, one per train, in (0, 180]). Each solved pulse takes the angle in[0, maximum_flip]whose echo comes nearest the prescription: the bound replaces 180 degrees as the upper end of the interval in the kernel's candidate search. A pulse held at the bound is an end of the interval, so its derivative is zero, and the tangent recursion carries that through the rest of the train.first_flipis not bounded.This is what pypulseqpp's target-signal PD trains (Buonincontri et al., ISMRM 2025) need. Their fitted targets ask for 180 degrees past about 60 echoes without a bound. On those targets the bounded kernel agrees with the earlier NumPy solver of pypulseqpp #227 to 1e-13 degrees.
Tests (
tests/trains/test_prescribed_flips.py):pytest tests/trains: 128 passed.Generated by Claude Code