Interactive Pulseq MRI sequence viewer for Jupyter — lightweight, beautiful, replaces seq.plot() in pypulseq.
Project description
SeqEyes — Interactive Pulseq MRI Sequence Viewer for Python
SeqEyes is a lightweight Python package that provides interactive
visualization of Pulseq text (.seq) and binary (.bseq) MRI sequences in Jupyter notebooks.
It works as a drop‑in replacement for pypulseq.Sequence.plot(),
rendering an interactive viewer directly in Jupyter notebook cell
output — just like Plotly.
Features
- 🎛️ Interactive waveform viewer — zoom, pan, per‑channel amplitude zoom
- 📍 Tooltip with block details (RF amplitude, gradient strength, ADC params)
- 🗺️ 3D k‑space trajectory viewer — rotate, zoom, depth‑sorted rendering
- 🎨 8 colour themes — system, light, dark, dracula, nord, and more
- 📏 Unit conversion — time (s / ms / µs), gradient (Hz/m / mT/m / G/cm)
- 📐 Minimap with TR/TE overlay and viewport indicator
- 💾 Export to standalone HTML — shareable, no Python needed
- 🔌 Drop‑in pypulseq integration —
seq.plot()just works
Installation
pip install seqeyes-python
For pypulseq integration:
pip install seqeyes-python[pypulseq]
Quick Start
import seqeyes
# Enable SeqEyes (once per session) — seq.plot() is now interactive
seqeyes.set(theme="dark", time_disp="ms")
# Build your sequence with pypulseq as usual
seq.plot() # interactive viewer in Jupyter
seq.plot(show_blocks=True) # per‑call overrides
seq.plot(time_range=(0, 0.05)) # zoom to first 50 ms
# Restore matplotlib at any time
seqeyes.reset()
In a plain .py script (no Jupyter), seq.plot() opens the viewer
in a desktop pop‑up window (requires pywebview) or falls back to
your default browser.
Using without pypulseq
from seqeyes import SeqEyesViewer
with open('my_sequence.seq') as f:
viewer = SeqEyesViewer(f.read(), theme="dark")
viewer # renders inline in Jupyter
Open either supported file format directly:
from seqeyes import SeqEyesViewer
SeqEyesViewer.from_file("my_sequence.seq", theme="dark")
SeqEyesViewer.from_file("my_sequence.bseq", theme="dark")
API Reference
| Function | Description |
|---|---|
seqeyes.set(**kwargs) |
Enable SeqEyes and set global defaults (theme, show_blocks, time_disp, grad_disp, time_range) |
seqeyes.reset() |
Restore matplotlib seq.plot() and clear all defaults |
SeqEyesViewer(source, ...) |
Low-level viewer for raw .seq text or .bseq bytes |
SeqEyesViewer.from_file(path, ...) |
Open a local .seq or .bseq file without pypulseq |
Viewer Controls
| Action | How |
|---|---|
| Zoom | Scroll wheel |
| Pan | Click + drag |
| Amplitude zoom (per channel) | Ctrl + scroll wheel |
| Tooltip | Hover over waveform |
| Toggle channels | Click legend labels |
| K‑Space viewer | Click "K‑Space" button |
| Rotate k‑space | Click + drag in panel |
| Minimap navigation | Click on minimap strip |
| Open another file | 📂 Open button |
Requirements
- Python ≥ 3.9
- numpy ≥ 1.21
- pypulseq ≥ 1.4 (optional, for
seq.plot()integration) - pywebview ≥ 5 (optional, for native desktop pop‑up windows)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seqeyes_python-0.2.7.tar.gz.
File metadata
- Download URL: seqeyes_python-0.2.7.tar.gz
- Upload date:
- Size: 565.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad9a18c92eadecad09a67c801e00fb2e425c2f27aa811df28091b51b1cafb19
|
|
| MD5 |
afe900a88c3e0b8bdf59d990490244ab
|
|
| BLAKE2b-256 |
f355f475887bcee50bf9fa494f037bbc81d15d82c9299f66aefabe9857eb4113
|
Provenance
The following attestation bundles were made for seqeyes_python-0.2.7.tar.gz:
Publisher:
publish.yml on bughht/seqeyes_plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seqeyes_python-0.2.7.tar.gz -
Subject digest:
9ad9a18c92eadecad09a67c801e00fb2e425c2f27aa811df28091b51b1cafb19 - Sigstore transparency entry: 2172036411
- Sigstore integration time:
-
Permalink:
bughht/seqeyes_plugin@872d03c7b1c0476dd0a8b962f4825be6726e1985 -
Branch / Tag:
refs/tags/v0.2.7 - Owner: https://github.com/bughht
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@872d03c7b1c0476dd0a8b962f4825be6726e1985 -
Trigger Event:
push
-
Statement type:
File details
Details for the file seqeyes_python-0.2.7-py3-none-any.whl.
File metadata
- Download URL: seqeyes_python-0.2.7-py3-none-any.whl
- Upload date:
- Size: 61.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fa43c5fa9278356cb8693847d9a08d1399da6d09ae9b78478a63b063b04e14e
|
|
| MD5 |
52dcf4e57594f968d460e4e1cdeecbc3
|
|
| BLAKE2b-256 |
d8961c8002ef440c943d1e7aa8db82537ce9478173d17351f5cf780e560d5443
|
Provenance
The following attestation bundles were made for seqeyes_python-0.2.7-py3-none-any.whl:
Publisher:
publish.yml on bughht/seqeyes_plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seqeyes_python-0.2.7-py3-none-any.whl -
Subject digest:
5fa43c5fa9278356cb8693847d9a08d1399da6d09ae9b78478a63b063b04e14e - Sigstore transparency entry: 2172036428
- Sigstore integration time:
-
Permalink:
bughht/seqeyes_plugin@872d03c7b1c0476dd0a8b962f4825be6726e1985 -
Branch / Tag:
refs/tags/v0.2.7 - Owner: https://github.com/bughht
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@872d03c7b1c0476dd0a8b962f4825be6726e1985 -
Trigger Event:
push
-
Statement type: