Skip to main content

orange-nmr-addon

Autor: Philipp Weller (AK Weller) · philipp.weller@googlemail.com

NMR-Preprocessing-Widgets für Orange3 — für die Verarbeitung von 1D-NMR- Spektren (z.B. ¹H) im Rahmen multivariater Analysen (Chemometrie).

🧩 Enthaltene Widgets

Widget Funktion
NMR Binning Spektrale Auflösung reduzieren (avg/sum/max-Buckets)
NMR Normalization Gesamtfläche / Maximum / L2 / Referenz-Region
NMR Baseline Correction Polynom-Fit oder Asymmetric Least Squares (ALS)
NMR Filter Savitzky-Golay: Glättung + Ableitungen
NMR Region Exclusion Lösungsmittel-/Artefakt-ppm-Bereiche entfernen
NMR Reference & Alignment Peak-basierte Verschiebung (Alignment)

Die Spektraldaten folgen der Orange/Spectroscopy-Konvention: Die Attributnamen kodieren die x-Achse (ppm-Werte).


⚡ Automatischer Installer (empfohlen)

Dieses Paket ist Teil des WellerLab-Monorepos (github.com/philippweller/WellerLab). Der gemeinsame Installer orange-install.py (auf Repo-Ebene) findet Oranges eigenes Python automatisch und installiert das Paket korrekt (macOS / Windows / Linux):

# NMR-Add-on installieren:
python orange-install.py nmr

# PLS-DA installieren:
python orange-install.py plsda

# nur zeigen, welches Python erkannt wurde:
python orange-install.py --show

# bestehende Installation prüfen:
python orange-install.py --check nmr

Läuft mit jedem Python (nur Standardbibliothek). Falls die Auto-Erkennung ausnahmsweise nicht greift:

python orange-install.py --python /pfad/zum/orange/python

▶️ Direkt ausführen ohne Clone:

curl -fsSL https://raw.githubusercontent.com/philippweller/WellerLab/main/orange-install.py -o orange-install.py && python3 orange-install.py nmr

Das Tool enthält auch den Windows---no-user-Fall automatisch, sodass das Add-on in Oranges eigene site-packages landet statt in die unsichtbare User-Site.


📋 Voraussetzungen

Voraussetzung Hinweis
Orange3 ≥ 3.40 installiert Version unter Hilfe → Über prüfen
Internet-Zugriff auf GitHub zum Herunterladen des Repos

⚠️ Wichtig: Es muss immer Oranges eigenes Python verwendet werden, nicht /usr/bin/python3! Sonst wird das Add-on in der falschen Umgebung installiert und Orange findet es nicht.


🚀 Installation (Schritt für Schritt)

macOS (Orange.app)

Schritt 1 — Oranges eingebettetes Python prüfen:

/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 --version

Merke dir diesen Pfad (abgekürzt als ORANGEPY).

Schritt 2 — Add-on von GitHub installieren:

ORANGEPY=/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3
$ORANGEPY -m pip install git+https://github.com/philippweller/WellerLab.git@main#subdirectory=orange-nmr-addon

Schritt 3 — Installation prüfen:

$ORANGEPY -c "import orangenmr; print('OK')"

Erscheint OK, ist das Paket korrekt installiert.

Schritt 4 — In Orange öffnen:

Orange starten. Die Widgets erscheinen unter der Kategorie NMR Preprocessing. Du musst Orange nicht neu starten — das Canvas-Fenster erneut öffnen genügt.


Windows (Orange Command Prompt)

Schritt 1 — Orange Command Prompt öffnen:

Startmenü → Orange → Orange Command Prompt.

Schritt 2 — Installieren:

python -m pip install git+https://github.com/philippweller/WellerLab.git@main#subdirectory=orange-nmr-addon

Schritt 3 — Prüfen:

python -c "import orangenmr; print('OK')"

Schritt 4 — Orange öffnen und unter NMR Preprocessing nachschauen.


Linux / Conda / Venv

Schritt 1 — Umgebung aktivieren:

conda activate orange    # oder: source .venv/bin/activate

Schritt 2 — Installieren:

pip install git+https://github.com/philippweller/WellerLab.git@main#subdirectory=orange-nmr-addon

Schritt 3 — Prüfen:

python -c "import orangenmr; print('OK')"

Schritt 4 — Orange starten und das Widget suchen.


Mit Spectroscopy-Integration (optional, empfohlen)

Falls die Software von orangecontrib.spectroscopy installiert ist, nutzt das Add-on dessen getx()-Funktion für eine robustere ppm-Achsen-Erkennung:

# macOS
$ORANGEPY -m pip install ".[full]"
# Windows / Linux / Conda
python -m pip install ".[full]"

🔄 Updates einspielen

Auf jedem Rechner mit installiertem Add-on:

Schritt 1 — aktuelle Version erneut installieren:

# macOS
$ORANGEPY -m pip install --upgrade --force-reinstall git+https://github.com/philippweller/WellerLab.git@main#subdirectory=orange-nmr-addon
# Windows / Linux / Conda
python -m pip install --upgrade --force-reinstall git+https://github.com/philippweller/WellerLab.git@main#subdirectory=orange-nmr-addon

Schritt 2 — Orange neu starten, damit die neuen Widgets geladen werden.

--force-reinstall wird empfohlen, weil Orange Widgets beim Canvas-Öffnen zwischenspeichert.


🗑️ Deinstallation

# macOS
$ORANGEPY -m pip uninstall orangenmr -y
# Windows / Linux / Conda
python -m pip uninstall orangenmr -y

Danach Orange neu starten.


🛠️ Fehlerbehebung

Problem Lösung
import orangenmr schlägt fehl Du hast das falsche Python benutzt (siehe Schritt 1).
Widget erscheint nicht in Orange pip show orangenmr prüfen; Orange vollständig neu starten.
Host key verification failed Nur beim SSH-Workflow relevant — nutze die git+https://-URL.
alte Version bleibt pip install --force-reinstall verwenden (siehe Updates).

📦 Entwicklung / Repo lokal ausprobieren

git clone git@github.com:philippweller/orange-nmr-addon.git
cd orange-nmr-addon
# Editable-Install:
$ORANGEPY -m pip install -e .

📄 Lizenz

MIT © Philipp Weller

Metadata

Release files for orangenmr 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orangenmr 0.1.1
File Size Uploaded Provenance Actions
orangenmr-0.1.1.tar.gz 15.2 kB Without provenance Details for orangenmr-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for orangenmr 0.1.1
File Interpreter ABI Platform Actions
orangenmr-0.1.1-py3-none-any.whl Python 3 none any Details for orangenmr-0.1.1-py3-none-any.whl

Total release size: 34.7 kB

Release files / orangenmr-0.1.1.tar.gz

Download URL orangenmr-0.1.1.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d9bbc69f28ae196e09cbc2f38b61294881bdcc48b8d2e4ccf481e4d57ea320bb
BLAKE2b-256 checksum
How to use checksums
4d90e500d79d47a33055bcfe19d34e3892db51dfc27b562c9aedc73d65b50c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Release files / orangenmr-0.1.1-py3-none-any.whl

Download URL orangenmr-0.1.1-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4816b06c224cfbc0ef1f121b880432455fe0a4009fee7c19dde4c0e189bc33a
BLAKE2b-256 checksum
How to use checksums
fd6db8dd3fc8acff54c243b3f08c3c36686bc858322ec9f85e88758436c268a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Security for orangenmr 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page