Scientific data analysis and publication-quality plotting for 50+ characterisation techniques.
Project description
Praxis
Scientific data analysis and publication-quality plotting for 50+ characterisation techniques.
Load raw lab data in 17+ formats, run technique-aware analysis, and produce journal-ready figures in nine journal styles -- all from a few lines of Python. Praxis (Greek praxis: practice, action) handles the boring parts of every characterisation workflow so you can focus on the science.
Install
pip install praxis-sci
Or install the development version from source:
git clone https://github.com/zmtsikriteas/praxis.git
cd praxis
pip install -e .
30-second example
Every technique ships with a built-in sample dataset, so you can try Praxis without supplying your own data:
from praxis.core.loader import load_sample
from praxis.core.utils import apply_style
from praxis.core.plotter import plot_data
from praxis.techniques.xrd import analyse_xrd
df = load_sample("xrd") # built-in Si pattern
results = analyse_xrd(df["two_theta_deg"], df["intensity"],
wavelength="Cu_Ka") # peak ID + Scherrer
apply_style("nature") # 89 mm column, Arial 7pt
fig, ax = plot_data(df["two_theta_deg"], df["intensity"],
xlabel=r"$2\theta$ (deg)",
ylabel="Intensity (a.u.)")
fig.savefig("xrd.png", dpi=300)
list_samples() prints all 26 available datasets (one per technique).
Gallery
Each tile is a complete figure produced by Praxis: real journal style, real analysis output, real annotations.
XRD with peak labels · Nature |
Tensile test, E and UTS · Elsevier |
Gaussian fit + 95% CI · RSC |
Raw / FFT / filtered · IEEE |
Multi-panel figure · Science |
2D contour map · Springer |
EIS Nyquist plot · ACS |
DSC: Tg / Tc / Tm · Wiley |
Ferromagnetic M-H loop · MDPI |
Raman of silicon · Nature |
UV-Vis Au plasmon · Wiley |
Cyclic voltammetry · IEEE |
All 12 figures are reproduced by python examples/generate_examples.py.
Features
- 22 technique modules with domain-specific analysis (Scherrer / Williamson-Hall for XRD, Tg / Tm / crystallinity for DSC, Tauc / Beer-Lambert for spectroscopy, Shirley / peak fits for XPS, equivalent-circuit fitting for EIS, capacity fade / dQ-dV for battery cycling, and more).
- 17+ data formats auto-detected: CSV, TSV, TXT, Excel, JSON, .xy, .dat, .asc, .spe, JCAMP-DX, HDF5, MATLAB .mat, Bruker .brml, PANalytical .xrdml (zipped and plain), Gamry .dta, Bio-Logic .mpr (via optional
galvani), clipboard. Smart handling of BOM-marked files, UTF-16, and European decimal-comma data. - 15+ plot types including line, scatter, bar, errorbar, histogram, box / violin, contour, heatmap, polar, waterfall, ternary, Smith chart, broken axis, multi-panel.
- 9 journal styles matching column widths, fonts, and DPI requirements: Nature, Science, ACS, Elsevier, Wiley, RSC, Springer, IEEE, MDPI.
- Colourblind-safe palettes by default: Okabe-Ito, Tol, uchu (perceptually uniform).
- Reproducible exports in PNG / SVG / PDF / EPS / TIFF, each with a
.meta.jsonsidecar capturing the parameters used. - Batch processing of hundreds of files with a single pipeline; analysis templates save and replay pipelines on new data.
- 26 built-in sample datasets so every cookbook recipe is copy-paste runnable.
Supported techniques
| Category | Techniques |
|---|---|
| Structural | XRD, SAXS / SANS / WAXS |
| Microscopy | SEM (grain size, porosity), EDS / EDX, AFM (roughness, profiles) |
| Spectroscopy | FTIR, Raman, UV-Vis, XPS, NMR, mass spectrometry |
| Thermal | DSC, TGA, DMA |
| Mechanical | Tensile, compression, nanoindentation, Vickers / Rockwell / Brinell hardness |
| Electrical | I-V, C-V, EIS, four-point probe, solar-cell J-V |
| Battery | Galvanostatic cycling (capacity, fade, CE), dQ / dV, rate capability |
| Magnetic | VSM / SQUID M-H loops, Curie temperature, Langevin fit |
| Porosity | BET surface area, BJH pore distribution |
| Chromatography | GC, HPLC, IC, SEC |
| Dielectric | Permittivity, loss tangent, Cole-Cole, Curie-Weiss |
| Piezoelectric | P-E loops, S-E butterfly, impedance resonance |
| Thermal transport | Laser flash, steady-state conductivity |
Documentation
| Doc | Contents |
|---|---|
| Cookbook | 50+ worked examples, one per technique: data, analysis, plot, expected output |
| Workflows | 12 complete multi-step pipelines from raw data to publication figure |
| Plot types | All 15+ plot types with runnable code |
| Techniques | Quick reference for every supported technique with expected data columns |
| Journal styles | Column widths, fonts, DPI for 9 journals |
| Colour palettes | Okabe-Ito, Tol, uchu palettes with hex codes |
Use as a Claude Code skill
Praxis was built to also work as a Claude Code skill. Sync the repository to your Claude skills folder and you get natural-language slash commands:
/praxis:plot Create any plot from data
/praxis:fit Curve fitting (10+ models + custom equations)
/praxis:peaks Peak detection, fitting, deconvolution
/praxis:baseline Baseline correction (polynomial, ALS, Shirley, SNIP)
/praxis:fft FFT, power spectrum, filtering
/praxis:smooth Savitzky-Golay, Gaussian, median, Whittaker
/praxis:stats Descriptive stats, t-test, ANOVA, regression
/praxis:batch Process multiple files with the same pipeline
/praxis:template Save / load analysis pipelines
/praxis:report Auto-generate analysis summary
/praxis:xrd XRD analysis (Scherrer, Williamson-Hall)
/praxis:impedance EIS (Nyquist, Bode, circuit fitting)
/praxis:dsc DSC / TGA analysis
/praxis:mechanical Stress-strain, DMA
/praxis:spectro FTIR / Raman / UV-Vis
/praxis:xps XPS peak fitting
/praxis:style Set journal style
/praxis:export Publication-quality export
/praxis:help Show all commands
See SKILL.md for the full skill definition.
Development
git clone https://github.com/zmtsikriteas/praxis.git
cd praxis
pip install -e .[test]
python -m pytest tests/ -v
134 tests run on every push to main on Python 3.10, 3.11, and 3.12 (see Actions).
Contributing
See CONTRIBUTING.md for setup, conventions, the
five-step recipe for adding a new technique, and how to add a new file
format. New techniques and vendor file-format parsers are the
highest-leverage contributions.
What's changed and what's coming: CHANGELOG.md.
Cite
If you use Praxis in research, please cite it via the Cite this repository button on the GitHub page (or see CITATION.cff).
License
MIT.
Project details
Release history Release notifications | RSS feed
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 praxis_sci-1.0.0.tar.gz.
File metadata
- Download URL: praxis_sci-1.0.0.tar.gz
- Upload date:
- Size: 276.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6c35f6a025c373422577549670335c06b2c1ab6b4ce35b9911e52383d08a76d
|
|
| MD5 |
8cc669a48b199ae2cab53936beaaf28e
|
|
| BLAKE2b-256 |
388bc7001ff8942605ff60db747dbc423bb277525fdfc99534543bbe55bc7f9b
|
Provenance
The following attestation bundles were made for praxis_sci-1.0.0.tar.gz:
Publisher:
publish.yml on zmtsikriteas/praxis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
praxis_sci-1.0.0.tar.gz -
Subject digest:
d6c35f6a025c373422577549670335c06b2c1ab6b4ce35b9911e52383d08a76d - Sigstore transparency entry: 1339460394
- Sigstore integration time:
-
Permalink:
zmtsikriteas/praxis@57cd05c41f160c23b083d87cfdb6c7126d185925 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/zmtsikriteas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@57cd05c41f160c23b083d87cfdb6c7126d185925 -
Trigger Event:
push
-
Statement type:
File details
Details for the file praxis_sci-1.0.0-py3-none-any.whl.
File metadata
- Download URL: praxis_sci-1.0.0-py3-none-any.whl
- Upload date:
- Size: 285.4 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 |
0bea81b3c24b3e7212a56aa61dc1e6bfd281dd24b637a1562aca4668fcc40d27
|
|
| MD5 |
acb4d0ece0d2eb7efe0aa2558757425d
|
|
| BLAKE2b-256 |
222dd0980db2817f6c0d0c3d6a537aaaf4c97ec613f1ec185274e1e9b784ea0c
|
Provenance
The following attestation bundles were made for praxis_sci-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on zmtsikriteas/praxis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
praxis_sci-1.0.0-py3-none-any.whl -
Subject digest:
0bea81b3c24b3e7212a56aa61dc1e6bfd281dd24b637a1562aca4668fcc40d27 - Sigstore transparency entry: 1339460508
- Sigstore integration time:
-
Permalink:
zmtsikriteas/praxis@57cd05c41f160c23b083d87cfdb6c7126d185925 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/zmtsikriteas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@57cd05c41f160c23b083d87cfdb6c7126d185925 -
Trigger Event:
push
-
Statement type: