Clean-architecture Python + React port of the quantized_matlab scientific toolbox (magnetometry / XRD / lab data).
Project description
quantized
A clean-architecture Python + React port of the
quantized_matlab scientific data toolbox for
magnetometry, X-ray/neutron diffraction, and generic lab data.
- Backend parity with the MATLAB toolbox: parsers, corrections, plotting, peak & curve fitting, materials calculators (DiraCulator), and a spreadsheet workspace (DataWorkspace).
- Revamped GUI built fresh in React, sharing the look-and-feel and
component conventions of the sibling
fermiviewerPython app. - Architecture that holds the line: pure
io/+calc/libraries, thin FastAPIroutes/, a 500-line per-module ceiling, and golden tests that freeze MATLAB outputs as the parity oracle — so this port never grows the god-scripts the MATLAB original accumulated.
Status: active development — backend + GUI are functional; native installers and PyPI packages publish from tagged releases (see
RELEASE.md). Seeplans/PORT_PLAN.mdfor the detailed workstream plan, andCLAUDE.mdfor the architecture hard-rules.
Scope
Magnetometry / XRD / lab-data analysis (parity with quantized_matlab).
Electron-microscopy tooling (Fermi viewer, EELS/EDS, imaging) is out of
scope and lives in the separate fermiviewer project.
Run it
Install matrix — pick whichever fits your workflow:
| Method | Command | Notes |
|---|---|---|
| pipx (recommended) | pipx install quantized-lab && qz |
isolated env, qz on PATH, no dev tools needed |
| uv tool | uv tool install quantized-lab && qz |
same idea, via uv |
| pip | pip install quantized-lab && qz |
into whatever env is active |
| Native installer | download from Releases | Windows .exe (NSIS, auto-updates), macOS .dmg, Linux .deb — no Python required, see RELEASE.md |
| From source | see below | for development |
Once installed, qz serves the app at http://127.0.0.1:8000 and opens a
browser tab. An empty library shows a "Drop files here, or use ⊞ to import
/ ✚ for a demo" hint — click ✚ for an instant synthetic dataset (built
client-side), or hit GET /api/samples/demo for a bundled sample dataset
parsed server-side through the normal import path — so a fresh install has
something to plot within seconds, no data file required.
From source — double-click a launcher (builds the UI + installs deps on first run, then opens the app in your browser):
- Windows: double-click
run.cmd - macOS: double-click
run.command(first time: right-click → Open)
Or one command (after uv + Node.js are installed):
# first time only: build the UI bundle the app serves
cd frontend && npm install && npm run build && cd ..
uv run qz # serve on :8000 and open a browser tab
uv run qz --port 9000 # different port
uv run qz --no-browser # headless (don't open a tab; never auto-exits)
uv run qz --desktop # native window (needs: pip install quantized-lab[desktop])
uv run qz --dev # contributor mode: Vite HMR + reloading backend
The default mode behaves like an app: closing the last browser tab shuts
the server down (a page refresh doesn't). Set QZ_AUTO_SHUTDOWN=0 to opt
out, use --no-browser for a persistent/headless server, or stop any mode
with Ctrl+C in its window.
Building your own wheel/sdist (e.g. for pip install .)? Build the frontend
first — cd frontend && npm ci && npm run build — before uv build /
python -m build, or the wheel ships without a UI (qz still runs; it just
prints a "UI not built" warning instead of serving one).
Develop
uv sync --group dev # backend deps
uv run pytest # backend tests (+ `-m golden` for MATLAB parity)
uv run ruff check src tests && uv run mypy src
cd frontend && npm test && npm run build
License: Apache-2.0.
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 quantized_lab-0.8.0.tar.gz.
File metadata
- Download URL: quantized_lab-0.8.0.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc1afafc5a224686ea3f991f74737869698d46c3ce348ddf7198172aeeb5e10
|
|
| MD5 |
f50bf903c5b5a061b28354b480f2314b
|
|
| BLAKE2b-256 |
63be7023e746d07ef745faa3fcc5a07e1e89e1901c69e0d53662a21e5b8d4823
|
Provenance
The following attestation bundles were made for quantized_lab-0.8.0.tar.gz:
Publisher:
pypi.yml on pquarterman17/quantized
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantized_lab-0.8.0.tar.gz -
Subject digest:
1dc1afafc5a224686ea3f991f74737869698d46c3ce348ddf7198172aeeb5e10 - Sigstore transparency entry: 2148046212
- Sigstore integration time:
-
Permalink:
pquarterman17/quantized@e38edc119ea79db3e796ef91de63f21c852e8041 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/pquarterman17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@e38edc119ea79db3e796ef91de63f21c852e8041 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quantized_lab-0.8.0-py3-none-any.whl.
File metadata
- Download URL: quantized_lab-0.8.0-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9269d9a41d67f903e2478887a0ac5922eaf85e8e111289708500ba688e3c164
|
|
| MD5 |
a06ff53daeb326ef46c1afb459cf940e
|
|
| BLAKE2b-256 |
e9cd65ffb6c2b664fbefaae4c0230a2d932f0a5c43f204af5d9f7a7f8776ff60
|
Provenance
The following attestation bundles were made for quantized_lab-0.8.0-py3-none-any.whl:
Publisher:
pypi.yml on pquarterman17/quantized
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantized_lab-0.8.0-py3-none-any.whl -
Subject digest:
c9269d9a41d67f903e2478887a0ac5922eaf85e8e111289708500ba688e3c164 - Sigstore transparency entry: 2148046215
- Sigstore integration time:
-
Permalink:
pquarterman17/quantized@e38edc119ea79db3e796ef91de63f21c852e8041 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/pquarterman17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@e38edc119ea79db3e796ef91de63f21c852e8041 -
Trigger Event:
push
-
Statement type: