Skip to content
View PolyXRD's full-sized avatar

Block or report PolyXRD

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
PolyXRD/README.md
PolyXRD Logo

PolyXRD

Comprehensive Analysis Suite for Polycrystalline X-ray Diffraction (XRD) Patterns

Peak detection · Multi-phase search · Rietveld refinement · Le Bail refinement · Indexing · 3D structure visualization

Current version

v5.6.2 (2026-11-16) — installers and SHA-256 checksums: Releases. Full release history: changelog.md. 中文文档(补充):README-CN.md.

What PolyXRD does

A Windows desktop application for the full powder-XRD workflow — raw pattern → preprocessing → peak detection → multi-phase identification → whole-pattern / Rietveld refinement → reports — with a Chinese / English / Japanese interface.

  • Data processing — .xrdml (PANalytical), .raw (Bruker), .txt / .csv import; SNIP, polynomial and wavelet background; Savitzky-Golay / FFT smoothing; Kα₂ stripping; second-derivative peak search and pseudo-Voigt / Pearson VII fitting; external-standard instrument calibration.
  • Phase identification — d-I matching with Hanawalt pre-screening and FoM scoring, formula / element restraints (must-have / contain / maybe / exclude), interactive periodic table, sequential multi-phase search, and joint whole-pattern fitting for weight fractions.
  • Refinement — the built-in polyxrd.refinement engine (structure factors, TCH profile, variable projection, Hill–Howard quantification, staged protocol with rollback, structured diagnostics) plus Le Bail cell refinement and optional FullProf / GSAS-II / MAUD integration.
  • Crystallography — indexing for cubic / tetragonal / hexagonal systems, CIF browser with 3D unit-cell rendering, hkl assignment, space-group cell constraints.
  • Projects & reports — .polyxrd JSON projects (parameters + full pattern archive), CSV / PNG / SVG / PDF exports, batch reports, and a scriptable services layer.
  • UI — PySide6 (Qt6) with a main / residual dual canvas, language switching without restart, light / dark themes, HiDPI support, and single-instance operation.

Design principles

  1. No Python environment for end users — the installer bundles Python 3.10 + PySide6 + the scientific stack; a source checkout stays fully runnable.
  2. Kernel / UI decoupled — services/ and refinement/ are pure computation, unit-testable without a display; views/ and viewmodels/ are a thin MVVM layer.
  3. Open data first — the bundled COD-Inorg default library is derived from the Crystallography Open Database (CC0). Proprietary ICDD data is never redistributed.
  4. Small, verifiable steps — every algorithm change ships with pytest acceptance criteria, so builds and numerical behaviour can be checked independently.

Project layout

src/polyxrd/
├── services/       # pure algorithms: IO, preprocessing, search, calibration, reports
├── refinement/     # built-in whole-pattern / Rietveld engine + diagnostics
├── models/        # Pattern, Peak, Phase, Project data models
├── viewmodels/     # MVVM state between services and views
├── views/          # PySide6 GUI
├── i18n/           # zh-CN / en-US / ja-JP translations
├── resources/      # icons, styles, bundled default library
├── utils/          # registration + build flavor (stdlib only, no Qt)
└── main.py         # application entry point
tests/               # pytest suite
scripts/             # build and release-verification helpers
run_dev.bat          # run the working tree without building
build.bat            # full release build

Getting started

End users (no Python required)

  1. Download PolyXRD-Setup-v5.6.2.exe and SHA256-v5.6.2.txt from Releases.
  2. Verify the SHA-256 checksum, install, and launch PolyXRD.exe.
  3. The bundled COD-Inorg default library works out of the box. Optional database packages are published in PolyXRD-DataBase Releases; mount them under Database ▸ External Database Manager…, effective immediately, no restart needed.

Releases ship program artifacts only — the installer and its checksum file, no portable package, no databases. ICDD PDF-2 2004 is never redistributed; users with a valid license prepare it themselves.

Developers (run from source)

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python -m polyxrd.main
python -m pytest -q

run_dev.bat at the repository root sets PYTHONPATH=src and launches the working tree directly — no PyInstaller build, always the latest source. Double-click it to start the GUI; it is the recommended entry point for manual acceptance.

Building release artifacts

set POLYXRD_FLAVOR=release
build.bat

build.bat performs icon generation → PyInstaller packaging → bundled-library check → Inno Setup compilation → SHA-256 generation. scripts/verify_release.ps1 -CheckDistVersion re-validates the produced artifacts. The version is defined once in src/polyxrd/__init__.py and mirrored in pyproject.toml, build.bat (APPVER) and scripts/PolyXRD-Setup.iss (AppVersion).

Builds & registration

Build Artifact Registration
Release (public) PolyXRD-Setup-v<ver>.exe Required; PXRD1-… code entered through the in-app registration dialog
Internal evaluation (local only) single-file PolyXRD.exe, not published None; the build marks itself as internal

Registration is shared across the PolyXRD family (PolyXRD-Reg). Only the installer and its SHA256-v<ver>.txt are attached to GitHub Releases.

Links

Downloads GitHub Releases
Release history changelog.md
中文文档(补充) README-CN.md
Developer entry point run_dev.bat
Database packages PolyXRD-DataBase Releases
License LICENSE · LICENSE-CN
Issues & feedback GitHub Issues

License

Dual license (Academic + Commercial): free for academic research and education; any commercial use requires a separate written license from the copyright holder. Full terms: LICENSE (English) and LICENSE-CN (中文). Upstream components — PySide6 (LGPL/GPL), pymatgen, spglib, COD and others — keep their own license terms.

This repository publishes program artifacts only. Databases are distributed separately, and ICDD PDF-2 2004 is never redistributed.

Popular repositories Loading

  1. PolyXRD PolyXRD Public

    PolyXRD - X-Ray Diffraction Pattern Analysis Suite

    Python 1

  2. XinMatch XinMatch Public

    Open-source powder XRD phase-analysis platform (clean-room implementation, COD reference library, GSAS-II refinement; multi-database search across COD/PCOD/TCOD/Materials Project)

    Python 1

  3. XinRefinement XinRefinement Public

    General-purpose powder diffraction full-pattern fitting (Rietveld structure refinement / Le Bail / quantification) desktop suite: Qt6 GUI + CLI + Python library API, interoperable with the XinMatch…

    Python 1

  4. PolyXRD-Converter PolyXRD-Converter Public

    PolyXRD Converter - converts between XRD pattern formats (xy, txt, dat, csv, mdi, raw, xrdml, json) with automatic multi-vendor RAW binary detection

    Python 1

  5. PolyXRD-SynthPattern PolyXRD-SynthPattern Public

    Synthetic XRD pattern generator for the PolyXRD ecosystem - simulates diffraction patterns to support phase analysis and algorithm validation

    Python 1

  6. PolyXRD-CifCalc PolyXRD-CifCalc Public

    PolyXRD CIF Calculator - XRD-oriented CIF structure search and generation with multi-source COD/AMCSD lookup, structure matching, 3D visualization and VESTA integration

    Python