Skip to content

FSE follow-up: signal-driven PD trains, golden-ratio adaptive ordering - #227

Closed
mcencini wants to merge 4 commits into
mainfrom
buonincontri-t3
Closed

mcencini wants to merge 4 commits into
mainfrom
buonincontri-t3

Conversation

@mcencini

Copy link
Copy Markdown
Contributor

Follow-up to #225, deferred from the 0.0.62 release: the Buonincontri work. Stacked on fse-packed-hotfixes; retarget to main once #225 merges.

Signal-driven PD trains

make_pd_schedule and the pd modulation of fse3D_sequence design each train by relaxation-aware inverse EPG of an explicit target signal (after Mugler's prescribed-signal principle). The family has eight parameters: an initial decrease from the second echo, a plateau with a slope, and a late tail. The maximum angle is a bound; a pulse the target would push past it plays it. The old first/maximum/final-angle controls and their per-shot Newton solve are gone.

The defaults PD_CENTRE and PD_PERIPHERY are fitted offline (benchmarks/pd_buonincontri_fit.py) to five trains read off Fig. 1 of Buonincontri et al. (Proc. ISMRM 2025, abstract 566-05-007; tests/fixtures/buonincontri_figure1.json, a public abstract). They are the only reference the defaults were fitted to. Timing assumed: 3.416 ms spacing, 4.162 ms to the first echo, T1/T2 1000/100 ms.

Train (pulses) RMS vs published
Centre (40) 1.0°
Intermediate 3 (30) 3.4°
Intermediate 2 (24) 3.6°
Intermediate 1 (21) 3.7°
Periphery (21) 2.4°

Before: the 0.0.61 PD defaults were 24–34° off and the closest fit of that family 7–11°. Most of the remaining residual sits in the first two pulses, which a single first angle and a smooth target cannot match (the published second pulse exceeds the first).

Transition

Each shot's target-signal parameters are a cubic step between the endpoints', and inverse EPG designs every shot's own train in one batched pass. For the abstract's transition (586 shots, ETL 45→20, 6 startup pulses), the whole design including both endpoints takes 0.09–0.10 s on one CPU thread (benchmarks/pd_schedule.py). The optional forward-EPG tail-onset fit takes 1.56 s at the centre and 0.09 s at the periphery. The fixed-ETL padding contract is unchanged.

Ordering

deal_trains keeps 0.0.61's assignment by default: Fig. 2C, the shot index sweeping with the angle within each radial section. The new ordering "buonincontri_golden" gives each shot one angle, the golden-ratio fraction of its rank along the transition. On a 192×160 plane (ETL 45→20, TR 1800→150 ms):

  • the correlation of shot place with angle goes from 0.695 to 0.011;
  • outer-ring mean TR by quadrant goes from 1612/879/388/244 to 793/776/775/779 ms;
  • the correlation with radius is unchanged (0.58).

Validation

FSE, PD, sampling, docstring and sequence-function tests: 869 passed before the last wording fix. Lint passes. The full suite is still to run, and the docs build is still to do.

Counterpart pulserver draft: the fse_pd3d controls, the ordering choice, and the elliptical calibration option.

🤖 Generated with Claude Code

mcencini and others added 4 commits November 9, 2026 14:54
…turn

FseReadout3D always builds the packed train (rf_overlap removed): the read
prephaser shares the excitation block and the tails of the prephaser and the
rewinders play in the next refocusing pulse's dead time. Partial echoes and
selective refocusing pulses pack too; the encode window keeps room for the
overlap, which the prephaser may take whole. A 3D train refuses a separate
excitation rephaser or a trigger. constant and optimized trains play the
first refocusing pulse at 180 degrees, as the overlap path did.

fse3D_sequence refuses a TR or peripheral TR shorter than the longest train
before dealing the shots, so a few-view design refuses what the scan would.

deal_trains gives each shot one angle, the golden-ratio fraction of its rank
along the transition, instead of dealing each section's angle-sorted views in
shot order: on the benchmark plane the outer ring's mean TR by quadrant goes
from 1612/879/388/244 ms to 793/776/775/779 ms, and the correlation of shot
place with angle from 0.69 to 0.01.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A sweep from 40 to 200 T/m/s, 1 T/m/s apart, over a 7 T 0.8 mm
prescription and a small matrix, with the readout alone and with the shipped
3D FSE. pypulseqpp 0.0.61 under rf_overlap failed in bands of the slew rate
(62-171 T/m/s on the 0.8 mm prescription), its encode window left shorter
than the shortest phase encode by the overlap; the spacing now keeps room
for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each section's angle-sorted views go to its slots in shot order again, as in
Fig. 2C of the Buonincontri abstract; the golden-ratio alternative moves to a
follow-up. The fse3D-individual fingerprint differs from main only through the
packed spacing, which moves the TE echo.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ordering

PD trains are relaxation-aware inverse EPG of an explicit target signal: an
initial decrease from the second echo, a plateau with a slope and a late
tail, eight parameters. Their defaults (PD_CENTRE, PD_PERIPHERY) are fitted
offline (benchmarks/pd_buonincontri_fit.py) to the trains read off Fig. 1 of
Buonincontri et al. (tests/fixtures/buonincontri_figure1.json), RMS 1.0 deg
centre, 3.4/3.6/3.7 deg intermediates, 2.4 deg periphery. Every shot of a
transition is designed from its own interpolated target in one batched pass,
0.09 s for 586 shots on one thread. The maximum angle is a bound.

deal_trains keeps 0.0.61's assignment by default; ordering
"buonincontri_golden" gives each shot one golden-ratio angle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pypulseqpp/_pd.py 90.62% 1 Missing and 2 partials ⚠️
src/pypulseqpp/_pd_opt.py 25.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor Author

This is superseded by changes ported onto current main, where this branch no longer merges cleanly:

The scanner side is pulserver/pulserver#381. Closing in favour of these.


Generated by Claude Code

@mcencini mcencini closed this Nov 12, 2026
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