Skip to main content
Orochi Logo

orochi.pixia

PyPi Forge PythonVersion PR

CI Codecov Black Tracking

Orochi PIXIA: 2D Area Detector Reduction & Geometry Calibration

The orochi.pixia package provides advanced 2D area detector data reduction, instrumental geometry calibration, and azimuthal integration tailored for high-energy synchrotron total scattering. Operating on raw detector images (flat panels, TIFF, EDF), orochi.pixia extracts pristine 1D diffraction profiles I(2θ) and I(Q) free from oblique sensor penetration distortion and edge-truncation artifacts.

Key Features

  • Detector Geometry Calibration: Refines incident beam center (x₀, y₀), calibrated sample-to-detector distance L₀, and detector tilt/rotation angles against standard calibration materials (SRM CeO₂, Ni).

  • Physical Sensor Corrections: Corrects for beam polarization, solid-angle distortion, detector thickness oblique absorption (μ_det · t_det), and capillary sample attenuation.

  • Automated Beamstop & Defect Masking: Automatically identifies circular beamstop shadows, inter-module gaps, and dead pixels.

  • Diagonal Sector Integration: Integrates over designated diagonal corner lobes (β = ±45° ± 18°, ±135° ± 18°), avoiding orthogonal detector edge boundaries to access maximum momentum transfer Q_max with invariant angular acceptance.

Quickstart: 2D Image Reduction

from orochi.pixia import Pixia
import matplotlib.pyplot as plt

# 1. Initialize Pixia
pixia = Pixia()
pixia.read_file("raw_detector_pattern.tif", target="sample")

# 2. Configure calibrated beamline geometry
pixia["beam_center_x"] = 1025.60
pixia["beam_center_y"] = 1053.13
pixia["distance"] = 227.575         # Sample-to-detector distance in mm
pixia["rambda"] = 0.18033           # Wavelength in Angstrom
pixia["pixel_size_x"] = 0.20        # Pixel pitch in mm
pixia["pixel_size_y"] = 0.20

# 3. Configure sector integration
pixia["integration_mode"] = "sector" # 'full' (360 deg) or 'sector' (diagonal lobes)
pixia["sector_angles"] = [-135, -45, 45, 135]
pixia["sector_delta"] = 18.0

# 4. Execute reduction pipeline
pixia.run()

# 5. Extract reduced 1D profile
two_theta = pixia.tth
intensity = pixia.intensity

plt.plot(two_theta, intensity)
plt.xlabel("2θ (deg)")
plt.ylabel("Corrected Intensity (counts)")
plt.show()

Citation

If you use orochi.pixia in a scientific publication, please cite this package as:

S. Tominaka, Orochi: A Physics-Grounded Python Package for Pair Distribution Function Analysis of Crystalline and Low-Dimensional Materials, 2026. https://github.com/Tominaka-Laboratory/orochi.pixia

Installation

The preferred method is to install using pip:

pip install orochi.pixia

To confirm that the installation was successful, type:

python -c "import orochi.pixia; print('Orochi PIXIA imported successfully')"

If you prefer to install from source:

git clone https://github.com/Tominaka-Laboratory/orochi.pixia.git
cd orochi.pixia
pip install -e .

Getting Started

You may consult our online documentation for tutorials and API references.

Support and Contribute

The orochi.pixia project welcomes your expertise and enthusiasm!

If you see a bug or want to request a feature, please report it as an issue and/or submit a fix as a PR.

Feel free to fork the project and contribute. To install orochi.pixia in a development mode, with its sources being directly used by Python rather than copied to a package directory, use the following in the root directory

pip install -e .

To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit hooks.

Improvements and fixes are always appreciated.

Before contributing, please read our Code of Conduct.

License

This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE.rst file for details.

This copyleft license guarantees that Orochi remains freely accessible, open, and transparent to the entire scientific community, and that all derivative works must likewise remain open source.

Citation

If you use this package in academic research, please cite:

@article{tominaka2026orochi,
  title   = {Orochi: A Physics-Grounded Python Package for Pair Distribution Function Analysis of Crystalline and Low-Dimensional Materials},
  author  = {Tominaka, Satoshi},
  year    = {2026},
  url     = {https://github.com/Tominaka-Laboratory/orochi}
}

Contact

For more information on orochi.pixia please visit the project web-page or email Dr. Satoshi Tominaka at tominaka.satoshi@nims.go.jp.

Metadata

Release files for orochi.pixia 4.0.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 orochi.pixia 4.0.0
File Size Uploaded Provenance
orochi_pixia-4.0.0.tar.gz 62.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for orochi.pixia 4.0.0
File Interpreter ABI Platform
orochi_pixia-4.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 126.9 kB

Release files / orochi_pixia-4.0.0.tar.gz

Download URL orochi_pixia-4.0.0.tar.gz
Size 62.5 kB
Tags Source
SHA-256 checksum
How to use checksums
33de50cc7e6b054012589893ff5b344e752f9ced32aeefe2257d00cffe484516
BLAKE2b-256 checksum
How to use checksums
b8ab4663c4d9a8454bc78be9dce59a129de3c8d5b972543a434ddbfb27f04db7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / orochi_pixia-4.0.0-py3-none-any.whl

Download URL orochi_pixia-4.0.0-py3-none-any.whl
Size 64.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2576a03fb54dfd531b7cadffbb8554bc965a4c67fefe27dbc4f0d539f7004cd0
BLAKE2b-256 checksum
How to use checksums
46b2c53ab84d166b95fd1edb4c77f9ef1feaa3df2028733160f5b441ac871f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for orochi.pixia 4.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

4.0.0 This release

2 release files No 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