Skip to content

About

Fast drop-in PyPulseq replacement over a C++ sequence core, with hardware safety checks.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

424 Commits

Folders and files

Repository files navigation

Tests codecov CodeFactor Ruff Docs: stable Docs: latest

PyPI Downloads Python Wheels License: MIT Source Stars FAIR checklist badge

pypulseqpp

pypulseqpp provides Pulseq sequence design and analysis through a PyPulseq-compatible Python interface over a C++ core. It includes RF, gradient and trajectory design, reusable sequence modules, complete sequence functions, and timing, gradient, PNS, mechanical-resonance and SAR checks. Its event factories and Sequence methods keep PyPulseq's signatures and event conventions; it reads Pulseq text files from version 1.2 onward and writes Pulseq 1.5.1 text and binary files, or 1.4.1 text for older interpreters. Not every PyPulseq feature is implemented, and the API reference lists what is. Passing these checks does not establish scanner or patient safety.

Features

  • Pulseq text and binary I/O, event storage, deduplication and repetition analysis.
  • RF, gradient and non-Cartesian trajectory design.
  • Composable excitation, preparation and readout SequenceModule classes.
  • Waveform, ADC sampling-location and k-space analysis with publication figures.
  • Timing, hardware-limit, PNS, mechanical-resonance and VOP-based SAR estimates.

pypulseqpp architecture

Quick start

pip install pypulseqpp
from pypulseqpp.sequences import gre2D_sequence

seq = gre2D_sequence(n_x=64, n_y=64, n_slices=1, tr=None)
ok, errors = seq.check_timing()
seq.write("gre2d.seq")

A PyPulseq script runs with import pypulseqpp as pp; from a PyPulseq script shows the same script as a sequence function.

Documentation

The user guide covers installation and support, and lists what each documentation section contains. The examples are a course in sequence design, from a pulse-acquire experiment to echo planar and non-Cartesian acquisitions, followed by a page for each shipped sequence. Every version of the documentation is published at https://pulserver.github.io/pypulseqpp/.

Citation

pypulseqpp has no project publication. Cite the foundational formats and APIs used in work built with it:

@article{layton2017pulseq,
  title   = {Pulseq: a rapid and hardware-independent pulse sequence prototyping framework},
  author  = {Layton, Kelvin J and Kroboth, Stefan and Jia, Feng and Littin, Sebastian
             and Yu, Huijun and Leupold, Jochen and Nielsen, Jon-Fredrik
             and St{\"o}cker, Tony and Zaitsev, Maxim},
  journal = {Magnetic Resonance in Medicine},
  volume  = {77},
  number  = {4},
  pages   = {1544--1552},
  year    = {2017},
  doi     = {10.1002/mrm.26235}
}

@article{ravi2019pypulseq,
  title   = {PyPulseq: A Python Package for MRI Pulse Sequence Design},
  author  = {Ravi, Keerthi Sravan and Geethanath, Sairam and Vaughan, John Thomas},
  journal = {Journal of Open Source Software},
  volume  = {4},
  number  = {42},
  pages   = {1725},
  year    = {2019},
  doi     = {10.21105/joss.01725}
}

License

MIT, except bundled or vendored third-party components that retain their own licences. See License and third-party notices.

About

Fast drop-in PyPulseq replacement over a C++ sequence core, with hardware safety checks.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages