Neutrino in python
The neutrino module opens Neutrino windows from python: images are numpy arrays, the tools (pans) are driven by
the names of their widgets, and the windows are Qt widgets of PySide6. It replaces the PyShell plugin (PythonQt).
from PySide6.QtWidgets import QApplication
import neutrino, numpy as np
app = QApplication([])
w = neutrino.Window()
w.addShowPhys(np.random.rand(512, 512))
w.bufferChanged.connect(lambda: print(w.currentBuffer().mean()))
neutrino.run()
neutrino.run() is app.exec() (it returns when the last window is closed), except in an interactive console: with
python -i script.py or ipython -i script.py it returns at once and the console can be used while the windows work
(in IPython it switches on %gui qt). In an IPython session started without a script, %gui qt does the same.
Installation
pip install neutrino-toolkit
or a wheel of the CI (pip install neutrino_toolkit-*.whl). It needs python >= 3.10 and installs PySide6 and numpy:
the module uses the Qt of PySide6 (the wheels have no Qt). Wheels: Linux x86_64 and aarch64, macOS >= 15
(arm64 and x86_64), Windows x86_64.
From the sources (pip install . in the Neutrino folder, or the cmake build with -DNEUTRINO_PYTHON_MODULE=ON:
PYTHONPATH=<build>/python), see
CMakeLists.txt and Wheel.cmake here.
Without PySide6 (a module built against another Qt), neutrino.app() creates the QApplication and
neutrino.exec() runs it.
Windows: neutrino.Window
w = neutrino.Window()a new window;neutrino.windows()all of themw.addPhys(array, name),w.addShowPhys(array, name)add a 2D array (copied, as float64) and return theImagew.currentBuffer()the pixels of the shown image (a numpy copy),w.currentImage()the shownImage,w.images()all of themw.fileOpen(filename)returns the list of theImages of the file,w.fileSave(...)w.openPan(name)opens a tool (neutrino.plugins()the names),w.getPan(name),w.pans(),w.newPan("name")an empty tool with that name (its title,w.getPan("name")), for PySide widgets: seePanbeloww.close(ask=False)closes it;w.askCloseUnsaved(False for the windows made in python) asks to save the images not savedw.widget()the PySide6QMainWindow- the slots of the window by name (e.g.
w.getZoom()), Qt properties withw.property(name),w.setProperty(name, value)
Signals (connect(callable), disconnect(callable=None); the callable gets the arguments it accepts):
bufferChanged (the Image), physAdd, physDel, physChanged, physReordered, panAdd, panDel,
mouseAtMatrix, mouseAtWorld and mouseClickAtWorld ((x, y)), nZoom, colorValue, closeAll, destroyed.
Images: neutrino.Image
img.array()(ornp.asarray(img)) the pixels as a numpy copy, shape(height, width);img.shapeimg.update(array)replaces the pixels (the shape can change)img.name,img.shortName,img.origin,img.scale(read and write)img.properties(),img.property(name),img.setProperty(name, value)the properties of the image (e.g. read from the file)img.show(),img.close(ask=False),img.window(),img.valid(False once closed)
Tools: neutrino.Pan
p.get("name"),p.set("name", value),p.button("name")(waits for the calculation it starts): the name of a widget is in square brackets in its tooltip;p.widgets()all the namesp.getData(...),p.show(),p.close(),p.raise_(),p.window()p.results(what=None): the data calculated by the pan, a dict of numpy arrays. By default the curves of its plots ({plot: {graph: {"x": ..., "y": ...}}},whatthe name of a plot); Visar gives{"visar": [{"time", "velocity", "velocityError", "reflectivity", ...}, ...], "sop": {...}}, withwhat"sop", a VISAR number (0 for the first) or its name ("Visar1"). A plugin gives its own by reimplementingnGenericPan::results(QVariant what)p.widget()the PySide6QMainWindowof the tool (e.g.p.widget().findChild(QSpinBox, "name"), orp.widget().setCentralWidget(my_widget)in a pan ofw.newPan);p.show()and notp.widget().show(): it also sets the title and the saved values, as for the other pans. AQToolBaradded beforep.show()withsetObjectName("toolBar")gets the buttons of the pans (Raise viewer, preferences, help)- its slots by name, Qt properties with
p.property(name),p.setProperty(name, value)
From PyShell
| PyShell | neutrino module |
|---|---|
neu (the window of the shell) |
w = neutrino.Window() or neutrino.windows()[0] |
nApp.neus() |
neutrino.windows() |
neutrino() |
neutrino.Window() |
n.getBufferList() |
w.images() |
n.getCurrentBuffer() |
w.currentImage(), pixels w.currentBuffer() |
nPhysD(...), array2phys(arr) + n.addShowPhys(a) |
w.addShowPhys(arr, name) |
phys2array(a), a.getData(), a.getBytes() |
img.array() |
a.getShape() |
img.shape |
a.get(x, y) |
img.array()[y, x] |
nPhysD.open(file) |
w.fileOpen(file) |
a.properties(), a.getProperty(n), a.setProperty(n, v) |
img.properties(), img.property(n), img.setProperty(n, v) |
n.getPanList(), n.getPan(name) |
w.pans(), w.getPan(name) |
n.newPan(), n.newPan('my.ui') |
w.newPan('name') + PySide widgets (a .ui file: PySide6.QtUiTools.QUiLoader) |
p.getIt/p.get, p.setIt/p.set, p.button |
p.get, p.set, p.button |
n.connect('mouseAtMatrix(QPointF)', f) |
w.mouseAtMatrix.connect(f) |
PythonQt.QtGui widgets |
PySide6 (p.widget(), w.widget()) |
| the modules folder of PyShell | the python environment (pip, venv, conda...) |
Examples
examples/: mouse_follow.py (a PySide window following the mouse), blur.py (scipy filters in new windows),
custom_pan.py (a tool with a PySide widget). tests/test_wheel.py is the test of the wheels.
Metadata
Release files for neutrino-toolkit 3.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 205.6 MB
Release files / neutrino_toolkit-3.2.0-cp312-abi3-win_amd64.whl
| Download URL | neutrino_toolkit-3.2.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e10b36a9be8f7c24245d14c833ac304930fd18526c72b544ef9832cc0c65f2b2
|
|
BLAKE2b-256 checksum How to use checksums |
f2019d30f5dd7d44809e0b9cccb37ab7c267540aceb9dbcce65e3a6f71abc41f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp312-abi3-manylinux_2_39_aarch64.whl
| Download URL | neutrino_toolkit-3.2.0-cp312-abi3-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 19.5 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
3c108707530730d2f70ab3adaabe1a4ead40669ec61c4f27b4e5fea5de20e405
|
|
BLAKE2b-256 checksum How to use checksums |
ee35f805ec9961990b981453fe01a0f0a95cb967626feb085df59dc60ffa1698
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp312-abi3-manylinux_2_34_x86_64.whl
| Download URL | neutrino_toolkit-3.2.0-cp312-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a1935339cf5151f79324aab8b88cb974a50b1abb8826196ba5d6dff8da63c4ce
|
|
BLAKE2b-256 checksum How to use checksums |
0859f1115a93ad7991972f1c3db0ae1e7e3a15b205acb5250fc98cea853071d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp312-abi3-macosx_15_0_x86_64.whl
| Download URL | neutrino_toolkit-3.2.0-cp312-abi3-macosx_15_0_x86_64.whl |
|---|---|
| Size | 12.4 MB |
| Tags | CPython 3.12 abi3 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
5e68421498356c9e3ee091595741999e04b92395276a9f576f059e8a8d7ffefc
|
|
BLAKE2b-256 checksum How to use checksums |
783c58809e4b9176af95007ce1631697089eb21cf092977d16e0ddc7ded84f95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp312-abi3-macosx_15_0_arm64.whl
| Download URL | neutrino_toolkit-3.2.0-cp312-abi3-macosx_15_0_arm64.whl |
|---|---|
| Size | 10.6 MB |
| Tags | CPython 3.12 abi3 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f866f3db68903a95df2694bb6b51c31dd8af3c1941b638d897141a7e55570f8f
|
|
BLAKE2b-256 checksum How to use checksums |
247676ffc9dfd77489a7371495593f0b92bc7bdff5c2abc6eb0dc420c331e9f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp311-cp311-win_amd64.whl
| Download URL | neutrino_toolkit-3.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
539189ddffa13fbe28a3bbe2a4601c13a3b66ec882fe19af10352f4c7d1275af
|
|
BLAKE2b-256 checksum How to use checksums |
c3b97e254de41037eeacd876206cf83b373e5fcd7e07d2698d85aebb6d0050bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp311-cp311-manylinux_2_39_aarch64.whl
| Download URL | neutrino_toolkit-3.2.0-cp311-cp311-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 19.5 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
6024789668abe6099960bfa716cb54b013d042d552e7eca69912136a79c5d586
|
|
BLAKE2b-256 checksum How to use checksums |
1b1b77e32047b0bcc1c5c3bad12f618b8c6fab8958feadab80d70fc213d8367f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | neutrino_toolkit-3.2.0-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
3ee4a4d8417edb8007c2cde21eb52ce1f478f0427e032c6e665ee3196c2b6141
|
|
BLAKE2b-256 checksum How to use checksums |
72f7356f8603adf4c5ae47e592251de85c8396e6a9367ef80e67d85c8adfd0e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp311-cp311-macosx_15_0_x86_64.whl
| Download URL | neutrino_toolkit-3.2.0-cp311-cp311-macosx_15_0_x86_64.whl |
|---|---|
| Size | 12.4 MB |
| Tags | CPython 3.11 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
6f56f30b17cab77fa09fd1b7a7bac8996cd813a89c6601eaacd2683e743e6c45
|
|
BLAKE2b-256 checksum How to use checksums |
ef77c7879989ecc38d023266265715241b773cd57d6fc4aa671a301aedee41fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | neutrino_toolkit-3.2.0-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 10.6 MB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cedad43df3432055f07455a43d850d85e35fba4fa5392fbc83a2e9d649cc701c
|
|
BLAKE2b-256 checksum How to use checksums |
5be94994436b33f1c01f5dc2c58c3f78aa0950667bda1e21f05b2e9e52971152
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp310-cp310-win_amd64.whl
| Download URL | neutrino_toolkit-3.2.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
43c19299006dc85afc396b12565f481b51101e5f17d68118211fc733120de563
|
|
BLAKE2b-256 checksum How to use checksums |
c9ce28d6445f0cdd8f4ea6223c8f203141d1cc099fc13e77ff1660e0f97eab36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp310-cp310-manylinux_2_39_aarch64.whl
| Download URL | neutrino_toolkit-3.2.0-cp310-cp310-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 19.5 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
0e492649becb59c3d323c876f59c05fed7f5d302eba0e2288c3541d231614df7
|
|
BLAKE2b-256 checksum How to use checksums |
09b27493c34034604ee3c16f92d1ad6279ff2304e3648d54096cb736ba7dc58a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | neutrino_toolkit-3.2.0-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
02bdb9159fc3a522c1da417166f26db8c07f1af940d0eba5ca53d6f31efe0e85
|
|
BLAKE2b-256 checksum How to use checksums |
538531117988f9b60e9e295ff68160aafc5f37125da524a6cfc76b92304ee8e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp310-cp310-macosx_15_0_x86_64.whl
| Download URL | neutrino_toolkit-3.2.0-cp310-cp310-macosx_15_0_x86_64.whl |
|---|---|
| Size | 12.4 MB |
| Tags | CPython 3.10 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
7e8a02569bdd3f2221a16057e7d7c1eda3155724c8f248602f08a714f0bf95d5
|
|
BLAKE2b-256 checksum How to use checksums |
5b191f6a806b6c13940e4c1e88c3da26ac39fbca90afaddf2ecb3a7843376d87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / neutrino_toolkit-3.2.0-cp310-cp310-macosx_15_0_arm64.whl
| Download URL | neutrino_toolkit-3.2.0-cp310-cp310-macosx_15_0_arm64.whl |
|---|---|
| Size | 10.6 MB |
| Tags | CPython 3.10 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
23b4d126a9d704d70645bead2f4d66bd0504db7671a8febe09477de441a2cce7
|
|
BLAKE2b-256 checksum How to use checksums |
b3716dd7236dc42b914c72cbd49d98912a4232f956e6438687c713f4dfc2b978
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for neutrino-toolkit 3.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 15 files in this release have been uploaded with provenance metadata.
Attestation for neutrino_toolkit-3.2.0-cp312-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.