This release is a pre-release and may not be stable for production use.
Glassure
Python and standalone Rust APIs for analysis of total X-ray diffraction data. It performs background subtraction, Fourier transform and optimization of experimental data.
Warning, the upgrade from version 1.4.5 to 2.0.0 has removed the GUI - which came with glassure. A new WebGUI based on the version 2 API is available under glassure.vercel.app.
Documentation
The documentation can be found here. For the source Rust implementation, see Using Glassure from Rust.
Changelog
The changelog can be found here.
Maintainer
Clemens Prescher (clemens.prescher@gmail.com)
Requirements
- Python 3.10+
- NumPy and Pydantic; the Rust numerical engine is bundled in Glassure 3
It is known to run on Windows, Mac OS X and Linux.
Installation
The Glassure package can be installed into your existing python distribution using pypi via:
python -m pip install glassure
Glassure 3.0.0rc1 is in preparation. Its standard installation requires only
NumPy and Pydantic. Matching wheels need no Rust compiler; source builds require
Rust 1.93 or newer. Install glassure[legacy] for the independent Python backend,
pandas tables, lmfit parameter objects and SciPy spline interfaces. See the
Glassure 3 migration guide and
Python release guide.
Quick Start
Check out the examples directory for complete working examples:
1. Quick Start ⭐
from glassure.pattern import Pattern
from glassure.calc import create_calculate_pdf_configs, calculate_pdf
# Load your data
data = Pattern.from_file("sample.xy")
bkg = Pattern.from_file("background.xy")
# Create configs with defaults (including high-Q fit normalization)
data_config, calculation_config = create_calculate_pdf_configs(
data=data,
composition="SiO2", # or {"Si": 1, "O": 2}
density=2.2, # g/cm³
bkg=bkg,
)
# Calculate PDF
result = calculate_pdf(data_config, calculation_config)
# Access results: S(Q), F(r), g(r)
result.sq.save("sq.xy")
result.fr.save("fr.xy")
result.gr.save("gr.xy")
2. Configuration System (For production)
For more control, use the configuration system with SampleConfig, TransformConfig, and CalculationConfig.
3. Raw Functions (For research/debugging)
For maximum control, use the low-level functions directly.
See the examples directory for complete, documented examples of all three approaches.
Example Datasets
The repository includes test datasets in tests/data/:
SiO2.xy- SiO2 (silica) X-ray scattering patternSiO2_bkg.xy- Background pattern
Use these with the example scripts to get started!
Rust backend
A standalone Rust numerical core, command-line application and NumPy-native
Python adapter are available in the Rust backend guide.
The core runs without Python and also compiles to WebAssembly. The existing
Python imports and configuration objects remain available. Numerical functions
default to auto: Rust from the bundled extension, with the Python reference
backend available through glassure[legacy]. Use backend="python" or backend="rust" per call, or select a mode
for a block with glassure.use_backend(...). See the
backend selection guide for examples and coverage.
Metadata
Release files for glassure 3.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| glassure-3.0.0rc1.tar.gz | 1.8 MB | With provenance | Details |
Built distributions (wheels)
Total release size: 28.1 MB
Release files / glassure-3.0.0rc1.tar.gz
| Download URL | glassure-3.0.0rc1.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ac77f5958a95e1760dc72710a1d76d16573fa15079538a12c009a7dd2deeab8
|
|
BLAKE2b-256 checksum How to use checksums |
f6618d61ecacfba06d82459d80c5e5aca4f2f980d8221041a72daf7d12722846
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp313-cp313-win_amd64.whl
| Download URL | glassure-3.0.0rc1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
cea413473cad75ede59949c434e45d3623c4414ae41726b0b5b2d7553bb17ef4
|
|
BLAKE2b-256 checksum How to use checksums |
714481712d46e61a6afd1f92c9bc558c0b835df455d11f7ffd4bf67d4cf0e5db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
22f86209ea118a131c974365a7cfeefbe474d555e5b3c30c49406338d26fe874
|
|
BLAKE2b-256 checksum How to use checksums |
bfce742efb123f61730a4cf3de2e099d874965e9b2329df6c346a20e1447264d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | glassure-3.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a9cd33c34f3b55d3060b03cc8d8008244417be9c54933d57168863044bb1cacc
|
|
BLAKE2b-256 checksum How to use checksums |
1a8cf666e58a910be19d79a63afc73adb4e8f4f4fc38cb4c18c4d4a82904480d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ef49c02eb649735d2e62da0b1f24d1f55bf993e4882b538a6bba048eae4c7c48
|
|
BLAKE2b-256 checksum How to use checksums |
458227e1dc802dcdf2edaa1cd15b4a5ab1a8f74dc74bdf1581e47f77386eb847
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp312-cp312-win_amd64.whl
| Download URL | glassure-3.0.0rc1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
86b9901faa00830f3d02ab4f5c250b595f855ec5db550a32b1e1ff1a11ac61d7
|
|
BLAKE2b-256 checksum How to use checksums |
4802d24254bdc9e77c4b43b7fa64a64ef6810765133d5327de4fea7b42a9a00f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
55fe4074022d07ca3351e77b88226ec0df879fa7857e57e5add4428576a56893
|
|
BLAKE2b-256 checksum How to use checksums |
183fffbe96217c7aad95cf45770223995e1d6c2fd6ea508d805bc4e203fc032d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | glassure-3.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f7c7abb5e127437181d9713e269cfd1a0d13a38c50be458cff20fba99c1c94a5
|
|
BLAKE2b-256 checksum How to use checksums |
7d2ac5d101c74ffd75f22a8323b594c138f51ffef58bb9b1ab9c39531263e373
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b3e87a753a36e9fbd298a9ea8e90bfc0fd00f20a837a2e535580b69f4c550fe4
|
|
BLAKE2b-256 checksum How to use checksums |
30cc2e76c05a18ce360f52bbcbf4a546fba136e846fc1b99e731fcac8e0a5681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp311-cp311-win_amd64.whl
| Download URL | glassure-3.0.0rc1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
63d7fafe550a7092c3c68d53e10940bf48b183f5ee737b531fb77c03afd95a2c
|
|
BLAKE2b-256 checksum How to use checksums |
94a6a3e2340398155b833a5d657563d9e57acaae8548f7208c475dd547598dae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
df3652065b40a5eb0ee24e51c46daec135fac6215cc390555f5040551ea2ed5b
|
|
BLAKE2b-256 checksum How to use checksums |
329dfbb6e3726681896e99d261dde015ac27dbc4157cd7534e58ec2b98831c9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | glassure-3.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a3765dc09d78b4ae113a3fe5f2a3849f422a9cf4e96eb07cdd827ee74aafe104
|
|
BLAKE2b-256 checksum How to use checksums |
fd55f930a2553bf015d96fa24925421a3f69558c7d7531bd6195d50d706ff3a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp311-cp311-macosx_10_12_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp311-cp311-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
684f5aed6533ceaf697e5eae3be5eb5f63500f32f21770f6be358e12b7ee3463
|
|
BLAKE2b-256 checksum How to use checksums |
ccdd8f9dda7b2f7f032a34f03eab8601d00f108dcca8e137f6a37962c2e6caff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp310-cp310-win_amd64.whl
| Download URL | glassure-3.0.0rc1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b56005cb6360b60c92885fe99e71230ac51763ea6824d100f1071f0ddafd8640
|
|
BLAKE2b-256 checksum How to use checksums |
1370a1e46540d68d4d0d31963bb2b9a5d896311e3460894463ab0883b717ff3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b4df5120960c0973c9e8cab3f4a3ba2041beeb5c7c76b86f915bba11e1614c69
|
|
BLAKE2b-256 checksum How to use checksums |
07fa178dbe1e94ec45f979ad45bb30c76c3a3cd0eb53fae7c9430697b81d1dc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | glassure-3.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
579931b9774343aaa8b769b6a21ad771bcb79b13a66fff37e332ea6d83080719
|
|
BLAKE2b-256 checksum How to use checksums |
4ec4018c0abdface8ce66a003dee8746d04cc24ab5f5f7cc527e18377c1a244a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logRelease files / glassure-3.0.0rc1-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | glassure-3.0.0rc1-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e8f9479fe95500a0dca030429c7ef9d55e7d38cff2c995d7d61a0029b4750f73
|
|
BLAKE2b-256 checksum How to use checksums |
b3717a8a0bc8a36c8a6fc756bce868b4c93e8952595214cf4cd13e2d655c6d8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 20, 2026.
Transparency logSecurity for glassure 3.0.0rc1
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 17 files in this release have been uploaded with provenance metadata.
Attestation for glassure-3.0.0rc1.tar.gz
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 Oct 20, 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.