Pulseq sequence design and analysis with a C++ core and a PyPulseq-compatible Python interface.
pypulseqpp combines compiled event storage, block registration and analysis with PyPulseq event factories. It also provides RF and gradient design, sampling patterns, and composable excitation, preparation and readout modules.
- Pulseq text and binary reading/writing, signatures and event deduplication.
- Waveform expansion, k-space trajectories, sequence reports and structural repetition detection.
- Timing, gradient amplitude, slew and boundary-continuity checks.
- Logical-frame FOV scaling, rotation and translation.
- Pulse, trajectory and sampling design, with reusable sequence modules.
This is an alpha package, not a complete replacement for every PyPulseq feature. PNS, SAR and mechanical resonance assessment are not provided by the core checks; passing them does not establish scanner or patient safety.
Scanner execution, protocol orchestration and reconstruction integration belong to Pulserver.
Requires Python 3.10 or later. Runtime dependencies are NumPy, SciPy and PyPulseq; the native core is included in platform wheels.
pip install pypulseqppThe optional viewer is a separate GPL-licensed package:
pip install 'pypulseqpp[plot]'import pypulseqpp as pp
system = pp.Opts(max_grad=40, grad_unit="mT/m", max_slew=150, slew_unit="T/m/s")
seq = pp.Sequence(system)
gx = pp.make_trapezoid("x", area=100, system=system)
seq.add_block(gx)
ok, errors = seq.check_timing()
seq.write("example.seq")Sequence-module classes are available from pypulseqpp.sequences.
The API reference
groups sequence operations, event design, sampling, modules and checks.
See the contribution guide for installation and checks. Build the local Markdown/Sphinx documentation with:
pip install -e '.[doc]'
make -C docs htmlOpen docs/build/html/index.html. The API reference is populated; the user
guide, developer guide and examples sections are scaffolds.