vccs
Composable charting components for Vue 3, ported from Recharts
rietx: Rietveld refinement of powder diffraction data, driven from Python and by agents.
DataPython · TypeScriptGitHub @yue-hereOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Rietveld refinement for the Holocene
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
rietx is an open-source Rietveld refinement and pattern analysis Python module with a streamlined API designed for those who want to drive refinements from code.
Condensed from examples/nac_11bm.py,
which fits APS 11-BM synchrotron data on Na₂Ca₃Al₂F₁₄ with a CaF₂ impurity.
Output of the full script (trimmed at the …):Read the full README ↗rietx is an open-source Rietveld refinement and pattern analysis Python module with a streamlined API designed for those who want to drive refinements from code.
pip install rietx # Python >= 3.11; numpy/scipy core, compiled kernels, matplotlib figures
Condensed from examples/nac_11bm.py,
which fits APS 11-BM synchrotron data on Na₂Ca₃Al₂F₁₄ with a CaF₂ impurity.
import rietx as rx
data = rx.read_pattern("11BM_NAC.fxye") # esd column read from file
structure = rx.Structure.from_cif("cod_1000236.cif")
instrument = rx.Instrument.debye_scherrer(wavelength=0.4139090)
ref = rx.Refinement(structure, instrument)
# structure-free Le Bail first: cell + profile + background
lebail = ref.fit(data, mode="lebail", two_theta_limits=(2, 24))
# then Rietveld under the staged turn-on order of McCusker et al. (1999)
result = ref.fit(data, plan="mccusker_default", two_theta_limits=(2, 24))
report = rx.build_report(result) # numbers, not pixels
result.plot(path="fit.png") # obs/calc/diff/ticks
Output of the full script (trimmed at the …):
Le Bail: status=converged Rwp=0.1436 GoF=5.44 a=10.251213 A
Rietveld: status=converged Rwp=0.0930 GoF=3.53
a = 10.251216 +/- 0.000039 A (COD reference 10.257(1); high-accuracy powder ~10.2497-10.2506)
warning[FLOOR_HIT]: phases.1.atoms.0.biso refined to its floor (ρ=+0.188).
info[CAPILLARY_OFFSET_UNAVAILABLE]: This capillary geometry declares no goniometer radius, …
FitReport: 53 misfit regions. The top 15 carry 74% of χ² and the other 38 carry 15%.
region 14.22- 14.54 deg localRwp=0.154 chi2share=13.7% max|d/sig|=49.6
…
Refinement history (every stage is a restorable checkpoint):
t5544a638 15 nodes data=11BM_NAC.fxye
n0000 root —
n0001 stage:bkg Rwp 3.1772
…
*n0014 stage:closing Rwp 0.0930
.xy/.xye, GSAS raw, pdCIF, .chi, Rigaku .ras/.rasx, Bruker
.uxd/.brml/.raw, PANalytical .xrdml/.udf and Philips .rd/.sdread_project_model opens a TOPAS .inp or a FullProf .pcr by content,
refine flags includedValidation suites are run in CI against real data. Details here: docs/VALIDATION.md
rietx skill --install puts it where your harness looks)git clone https://github.com/yue-here/rietx && cd rietx
uv venv --python 3.12 && uv pip install -e ".[dev]"
.venv/bin/python -m pytest -n auto --dist loadgroup -m "not slow" # ~1-3 min
.venv/bin/python -m pytest -n auto --dist loadgroup # + real-data acceptance, ~15-30 min
.venv/bin/python -m ruff check src tests examples
--dist loadgroup is required to keep shared expensive fixtures on one
worker. For the test ladder and style see
CONTRIBUTING.md, and AGENTS.md if your
contributor is an agent.
MIT. Algorithms are independently implemented from the published literature, with sources cited in the manual. A full list of sources is also provided in ATTRIBUTION.md, and test-data provenance is listed in tests/data/README.md. CIF and symmetry handling uses gemmi. To cite the package, use CITATION.cff.
FitReport, an output bundle designed for agentic consumption.rietx guirietx watchrietx comparerx.viz.render_structure