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.15.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.15.0
File Size Uploaded Provenance
cryspy-0.15.0.tar.gz 1.4 MB With provenance Details

Built distribution (wheel)

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

Total release size: 3.1 MB

Release files / cryspy-0.15.0.tar.gz

Download URL cryspy-0.15.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
d744268b546d1b15a168d4c94d0ceb519d5832946fd4a56ec2a8c0b040845c78
BLAKE2b-256 checksum
How to use checksums
3b42c4d86716213e2eaab4d07737ec7d8335a12302954cae1a3d32742aa06f5c
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 21, 2026.

Transparency log

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

Download URL cryspy-0.15.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bd577a908188f15a2d9ac11213186a47cd0dca10049a2918c5b2c504ccea1c04
BLAKE2b-256 checksum
How to use checksums
62f2028205611e48b23dcc36e87538ab79364bde53c66059017666cd87f5e003
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 21, 2026.

Transparency log

Security for cryspy 0.15.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.15.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 21, 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.15.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