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.16.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.16.0
File Size Uploaded Provenance
cryspy-0.16.0.tar.gz 1.4 MB With provenance Details

Built distribution (wheel)

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

Total release size: 3.1 MB

Release files / cryspy-0.16.0.tar.gz

Download URL cryspy-0.16.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
175615afe23d16df5a1d44f0f2d1faba476879f19e8d3da3fbc000f4acb5cdc9
BLAKE2b-256 checksum
How to use checksums
0d891010936a586bb496e79c28a2ed30f9b1701a1a0b4ddb42faa030c4c74121
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.16.0-py3-none-any.whl

Download URL cryspy-0.16.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
67df3bb384ac824efef87e9e14d69195e7234f987d2c2051490679d8f8f4dda0
BLAKE2b-256 checksum
How to use checksums
ea3b7df5cf53911f66d10089114843be5d987f5725107395813120958e06553b
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.16.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.16.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.16.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