Skip to main content

Advisor-Scattering: Advanced Visual X-ray Scattering Toolkit for Reciprocal-space visualization and calculation

Project description

Advisor-Scattering — Advanced Visual Scattering Toolkit for Reciprocal-space

Python PyQt5

Advisor-Scattering is a PyQt5 desktop app for X-ray scattering/diffraction experiments. It helps you convert scattering angles ↔ momentum transfer (HKL), explore scattering geometry, and visualize structure factors—all with interactive plots. Full docs on Read the Docs.

Demo video or use the link below to view the demo video. ▶ Demo video (MP4)

Features

  • Convert scattering angles to momentum transfer (HKL) and vice versa.
  • Visualize scattering geometry and unit cells
  • Compute and visualize structure factors in reciprocal space.
  • CIF file drop-in support

Install

  • Python 3.8+ with PyQt5, numpy, scipy, matplotlib, Dans_Diffraction (see requirements.txt).

It is recommened to install from PyPI:

pip install advisor-scattering

Run

advisor
# or
advisor-scattering
# or
python -m advisor

Note: the install command is pip install advisor-scattering, and the import is import advisor.


Minimal workflow (60 seconds)

  1. Launch the app.
  2. Enter lattice constants/angles and beam energy, or drop a CIF file.
  3. Click Initialize.
  4. Use the feature tabs (Scattering Geometry / Structure Factor) to calculate and visualize.

Init flow


Using the app

1. Initialization window

  • Enter lattice constants (a, b, c) and angles (alpha, beta, gamma); beam energy auto-updates wavelength/|k|.
  • Optional: drop a CIF to autofill lattice parameters and preview the unit cell.
  • Adjust Euler angles (roll, pitch, yaw) to orient the sample relative to the scattering plane;
  • Click Initialize to load the main interface and pass parameters to all tabs.

2. Scattering Geometry tab

  • Angles → HKL: enter 2θ/θ/χ/φ, compute HKL.
  • HKL → Angles: enter HKL, compute feasible angles.
  • HK to Angles (fixed 2θ) and HKL scan (fixed 2θ) subtabs for trajectory planning.

Scattering geometry demo

3. Structure Factor tab

  • Requires a CIF (from init) and an energy in the tab.
  • HKL plane: explore a 3D HKL cube with linked HK/HL/KL slices.
  • Customized plane: choose U/V vectors and a center to sample an arbitrary plane in reciprocal space.

Structure factor demo

4. Resetting

Use the toolbar button or File → Reset Parameters to return to the init window, clear the CIF lock, and re-enter parameters.


Project structure (at a glance)

advisor/          application package
  app.py          bootstrap
  controllers/    app/feature coordinators
  domain/         math and geometry helpers (no PyQt)
  features/       per-feature domain/controller/ui code
  ui/             shared UI pieces (init window, main window, base tab, visualizers)
  resources/      QSS, icons, config JSON, sample data
docs/             Sphinx sources and assets

Documentation

  • Full Sphinx docs live in docs/ and on Read the Docs.
  • Appendix covers scattering angle definitions and HKL conventions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

advisor_scattering-0.5.3.tar.gz (330.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

advisor_scattering-0.5.3-py3-none-any.whl (350.9 kB view details)

Uploaded Python 3

File details

Details for the file advisor_scattering-0.5.3.tar.gz.

File metadata

  • Download URL: advisor_scattering-0.5.3.tar.gz
  • Upload date:
  • Size: 330.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for advisor_scattering-0.5.3.tar.gz
Algorithm Hash digest
SHA256 a20ce2f1ebdb4121efd4aa61de09077aa3af36171d427c2d69c40fd3d5f8e4fc
MD5 2272c5b150e5f6acd18afeecbee7914b
BLAKE2b-256 b752fcf83ec287110a177f90aad90c5afe75bf9f9ab7ac84cf3d68e03e19abfb

See more details on using hashes here.

File details

Details for the file advisor_scattering-0.5.3-py3-none-any.whl.

File metadata

File hashes

Hashes for advisor_scattering-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 65abc30618e94046668f9328e8559cdb25a68a4504ed7b6d06f0edc892eb1f29
MD5 c1e85c98cb6be20b14dc5d55115e0b3f
BLAKE2b-256 c36fbabe6203d94675bbbeff325f4165396b05b2b29b53ca7489e495651ecda1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page