seqeyes-python 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ node_modules/
2
+ out/
3
+ *.vsix
4
+ *.mltbx
5
+ out/
6
+ dist/
7
+ *.vsix
8
+ *.mltbx
9
+ *.asc
10
+ .vscode-test/
11
+ .vscode/
12
+ test-results/
13
+ playwright-report/
14
+ performance-results/
15
+ matlab/pulseq-bundle.js
16
+ .DS_Store
17
+ __pycache__/
18
+ .pytest_cache/
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: seqeyes-python
3
+ Version: 0.2.0
4
+ Summary: Interactive Pulseq MRI sequence viewer for Jupyter — lightweight, beautiful, replaces seq.plot() in pypulseq.
5
+ Project-URL: Homepage, https://github.com/bughht/seqeyes_plugin
6
+ Project-URL: Repository, https://github.com/bughht/seqeyes_plugin
7
+ Author: SeqEyes Developers
8
+ License: MIT
9
+ Keywords: gradient,k-space,mri,pulseq,seqeyes,sequence,visualization
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Framework :: Jupyter
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
20
+ Classifier: Topic :: Scientific/Engineering :: Visualization
21
+ Requires-Python: >=3.9
22
+ Requires-Dist: numpy>=1.21
23
+ Provides-Extra: desktop
24
+ Requires-Dist: pywebview>=5; extra == 'desktop'
25
+ Provides-Extra: pypulseq
26
+ Requires-Dist: pypulseq>=1.4; extra == 'pypulseq'
27
+ Provides-Extra: test
28
+ Requires-Dist: pytest>=7; extra == 'test'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # SeqEyes — Interactive Pulseq MRI Sequence Viewer for Python
32
+
33
+ **SeqEyes** is a lightweight Python package that provides interactive
34
+ visualization of Pulseq (.seq) MRI sequences in Jupyter notebooks.
35
+ It works as a drop‑in replacement for `pypulseq.Sequence.plot()`,
36
+ rendering an interactive viewer directly in Jupyter notebook cell
37
+ output — just like Plotly.
38
+
39
+ ## Features
40
+
41
+ - 🎛️ **Interactive waveform viewer** — zoom, pan, per‑channel amplitude zoom
42
+ - 📍 **Tooltip** with block details (RF amplitude, gradient strength, ADC params)
43
+ - 🗺️ **3D k‑space trajectory viewer** — rotate, zoom, depth‑sorted rendering
44
+ - 🎨 **8 colour themes** — system, light, dark, dracula, nord, and more
45
+ - 📏 **Unit conversion** — time (s / ms / µs), gradient (Hz/m / mT/m / G/cm)
46
+ - 📐 **Minimap** with TR/TE overlay and viewport indicator
47
+ - 💾 **Export to standalone HTML** — shareable, no Python needed
48
+ - 🔌 **Drop‑in pypulseq integration** — `seq.plot()` just works
49
+
50
+ ## Installation
51
+
52
+ ```bash
53
+ pip install seqeyes-python
54
+ ```
55
+
56
+ For pypulseq integration:
57
+ ```bash
58
+ pip install seqeyes-python[pypulseq]
59
+ ```
60
+
61
+ ## Quick Start
62
+
63
+ ```python
64
+ import seqeyes
65
+
66
+ # Enable SeqEyes (once per session) — seq.plot() is now interactive
67
+ seqeyes.set(theme="dark", time_disp="ms")
68
+
69
+ # Build your sequence with pypulseq as usual
70
+ seq.plot() # interactive viewer in Jupyter
71
+ seq.plot(show_blocks=True) # per‑call overrides
72
+ seq.plot(time_range=(0, 0.05)) # zoom to first 50 ms
73
+
74
+ # Restore matplotlib at any time
75
+ seqeyes.reset()
76
+ ```
77
+
78
+ In a plain `.py` script (no Jupyter), `seq.plot()` opens the viewer
79
+ in a desktop pop‑up window (requires `pywebview`) or falls back to
80
+ your default browser.
81
+
82
+ ### Using without pypulseq
83
+
84
+ ```python
85
+ from seqeyes import SeqEyesViewer
86
+
87
+ with open('my_sequence.seq') as f:
88
+ viewer = SeqEyesViewer(f.read(), theme="dark")
89
+
90
+ viewer # renders inline in Jupyter
91
+ ```
92
+
93
+ ## API Reference
94
+
95
+ | Function | Description |
96
+ |---|---|
97
+ | `seqeyes.set(**kwargs)` | Enable SeqEyes and set global defaults (`theme`, `show_blocks`, `time_disp`, `grad_disp`, `time_range`) |
98
+ | `seqeyes.reset()` | Restore matplotlib `seq.plot()` and clear all defaults |
99
+ | `SeqEyesViewer(seq_text, ...)` | Low‑level viewer for raw `.seq` content (no pypulseq needed) |
100
+
101
+ ## Viewer Controls
102
+
103
+ | Action | How |
104
+ |---|---|
105
+ | Zoom | Scroll wheel |
106
+ | Pan | Click + drag |
107
+ | Amplitude zoom (per channel) | Ctrl + scroll wheel |
108
+ | Tooltip | Hover over waveform |
109
+ | Toggle channels | Click legend labels |
110
+ | K‑Space viewer | Click "K‑Space" button |
111
+ | Rotate k‑space | Click + drag in panel |
112
+ | Minimap navigation | Click on minimap strip |
113
+ | Open another file | 📂 Open button |
114
+
115
+ ## Requirements
116
+
117
+ - Python ≥ 3.9
118
+ - numpy ≥ 1.21
119
+ - pypulseq ≥ 1.4 (optional, for `seq.plot()` integration)
120
+ - pywebview ≥ 5 (optional, for native desktop pop‑up windows)
121
+
122
+ ## License
123
+
124
+ MIT
@@ -0,0 +1,94 @@
1
+ # SeqEyes — Interactive Pulseq MRI Sequence Viewer for Python
2
+
3
+ **SeqEyes** is a lightweight Python package that provides interactive
4
+ visualization of Pulseq (.seq) MRI sequences in Jupyter notebooks.
5
+ It works as a drop‑in replacement for `pypulseq.Sequence.plot()`,
6
+ rendering an interactive viewer directly in Jupyter notebook cell
7
+ output — just like Plotly.
8
+
9
+ ## Features
10
+
11
+ - 🎛️ **Interactive waveform viewer** — zoom, pan, per‑channel amplitude zoom
12
+ - 📍 **Tooltip** with block details (RF amplitude, gradient strength, ADC params)
13
+ - 🗺️ **3D k‑space trajectory viewer** — rotate, zoom, depth‑sorted rendering
14
+ - 🎨 **8 colour themes** — system, light, dark, dracula, nord, and more
15
+ - 📏 **Unit conversion** — time (s / ms / µs), gradient (Hz/m / mT/m / G/cm)
16
+ - 📐 **Minimap** with TR/TE overlay and viewport indicator
17
+ - 💾 **Export to standalone HTML** — shareable, no Python needed
18
+ - 🔌 **Drop‑in pypulseq integration** — `seq.plot()` just works
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ pip install seqeyes-python
24
+ ```
25
+
26
+ For pypulseq integration:
27
+ ```bash
28
+ pip install seqeyes-python[pypulseq]
29
+ ```
30
+
31
+ ## Quick Start
32
+
33
+ ```python
34
+ import seqeyes
35
+
36
+ # Enable SeqEyes (once per session) — seq.plot() is now interactive
37
+ seqeyes.set(theme="dark", time_disp="ms")
38
+
39
+ # Build your sequence with pypulseq as usual
40
+ seq.plot() # interactive viewer in Jupyter
41
+ seq.plot(show_blocks=True) # per‑call overrides
42
+ seq.plot(time_range=(0, 0.05)) # zoom to first 50 ms
43
+
44
+ # Restore matplotlib at any time
45
+ seqeyes.reset()
46
+ ```
47
+
48
+ In a plain `.py` script (no Jupyter), `seq.plot()` opens the viewer
49
+ in a desktop pop‑up window (requires `pywebview`) or falls back to
50
+ your default browser.
51
+
52
+ ### Using without pypulseq
53
+
54
+ ```python
55
+ from seqeyes import SeqEyesViewer
56
+
57
+ with open('my_sequence.seq') as f:
58
+ viewer = SeqEyesViewer(f.read(), theme="dark")
59
+
60
+ viewer # renders inline in Jupyter
61
+ ```
62
+
63
+ ## API Reference
64
+
65
+ | Function | Description |
66
+ |---|---|
67
+ | `seqeyes.set(**kwargs)` | Enable SeqEyes and set global defaults (`theme`, `show_blocks`, `time_disp`, `grad_disp`, `time_range`) |
68
+ | `seqeyes.reset()` | Restore matplotlib `seq.plot()` and clear all defaults |
69
+ | `SeqEyesViewer(seq_text, ...)` | Low‑level viewer for raw `.seq` content (no pypulseq needed) |
70
+
71
+ ## Viewer Controls
72
+
73
+ | Action | How |
74
+ |---|---|
75
+ | Zoom | Scroll wheel |
76
+ | Pan | Click + drag |
77
+ | Amplitude zoom (per channel) | Ctrl + scroll wheel |
78
+ | Tooltip | Hover over waveform |
79
+ | Toggle channels | Click legend labels |
80
+ | K‑Space viewer | Click "K‑Space" button |
81
+ | Rotate k‑space | Click + drag in panel |
82
+ | Minimap navigation | Click on minimap strip |
83
+ | Open another file | 📂 Open button |
84
+
85
+ ## Requirements
86
+
87
+ - Python ≥ 3.9
88
+ - numpy ≥ 1.21
89
+ - pypulseq ≥ 1.4 (optional, for `seq.plot()` integration)
90
+ - pywebview ≥ 5 (optional, for native desktop pop‑up windows)
91
+
92
+ ## License
93
+
94
+ MIT