Skip to main content

CrysPy

PyPI Python Tests License: MIT DOI

CrysPy is a crystallographic Python library for the analysis of polarized and unpolarized neutron diffraction data, and of X-ray diffraction data. It handles powders and single crystals: nuclear and magnetic structure refinement, local magnetic susceptibility, and the reconstruction of spin and magnetization densities by the maximum entropy method.

Features

  • Refinement (RhoChi) of single-crystal and powder data: polarized and unpolarized neutrons, X-rays, 1D and 2D powder patterns, time of flight.
  • Magnetic structures in magnetic space groups (mcif), local magnetic anisotropy by the susceptibility approach.
  • Spin and magnetization density reconstruction by the maximum entropy method (MEMPy).
  • Input and output in .rcif, a CIF-like format built on the IUCr Core CIF dictionary, so data and results can be archived and exchanged.
  • Works in scripts and Jupyter notebooks on Windows, macOS and Linux. CrysPy Editor is the graphical user interface for CrysPy.

Installation

pip install cryspy

Example

Refine a powder pattern of PbSO4 from examples/:

import cryspy

rcif = cryspy.load_file("examples/rhochi_unpolarized_powder_1d_PbSO4/"
                        "rhochi_unpolarized_powder_1d_PbSO4.rcif")
result = cryspy.rhochi_rietveld_refinement(rcif)   # refines the values marked with ()
print(result["chi_sq"])
print(rcif.crystal_pbso4.cell)

with open("refined.rcif", "w") as fid:
    fid.write(rcif.to_cif())

More examples, one folder per experiment type, are in examples/.

License

MIT License, Copyright (c) 2018-2026 Iurii Kibalin. See LICENSE.

Metadata

Release files for cryspy 0.18.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cryspy 0.18.0
File Size Uploaded Provenance
cryspy-0.18.0.tar.gz 1.5 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cryspy 0.18.0
File Interpreter ABI Platform
cryspy-0.18.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / cryspy-0.18.0.tar.gz

Download URL cryspy-0.18.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c0e33311ee3eb56d800198297d850955e9f55ef58596c0836a67036fc520b4d9
BLAKE2b-256 checksum
How to use checksums
476ab6a9977cc8928096d58b524a4cf779919b413af0ebc14c9586a679746bf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Release files / cryspy-0.18.0-py3-none-any.whl

Download URL cryspy-0.18.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ab6fa0605d74f870b1f37f6ec4b79451ea2e658a1feccab19c0b9f477f778a26
BLAKE2b-256 checksum
How to use checksums
5daf7d964ee324ce75139a7c8268744576e76259e0a7cf3ccc6bf5eb1e72e642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Security for cryspy 0.18.0

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cryspy-0.18.0.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 22, 2026.

Transparency log

A 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.18.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page