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
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.
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).
From PyPI:
pip install advisor-scattering
From source:
python -m venv .venv
source .venv/bin/activate # .venv\Scripts\activate on Windows
pip install -r requirements.txt
pip install .
Run
advisor-scattering
# or
advisor
# or
python -m advisor
Note: the install command is pip install advisor-scattering, and the import is import advisor.
Minimal workflow (60 seconds)
- Launch the app.
- Enter lattice constants/angles and beam energy, or drop a CIF file.
- Click Initialize.
- Use the feature tabs (Scattering Geometry / Structure Factor) to calculate and visualize.
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.
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file advisor_scattering-0.5.2.tar.gz.
File metadata
- Download URL: advisor_scattering-0.5.2.tar.gz
- Upload date:
- Size: 327.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01de76366542425521392b0c529834d09816a414bc221b7b93d9e607e8c21fe3
|
|
| MD5 |
8e0af1abf8361fe941777f71ec54fc40
|
|
| BLAKE2b-256 |
b4ccdccedd682c4fd6f4d4e63ccff211efdca16058e5f4bb5810290c5dcd140d
|
File details
Details for the file advisor_scattering-0.5.2-py3-none-any.whl.
File metadata
- Download URL: advisor_scattering-0.5.2-py3-none-any.whl
- Upload date:
- Size: 347.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89d19891b999b6711ca414775a2c9f69c41145fec27ed7c0531fb7980d0d53a4
|
|
| MD5 |
cf04cdde88061b9bf8203ab61542438a
|
|
| BLAKE2b-256 |
c4bd14315a636f8fdeafbe2da786f0fd29bd5ac7eda6f078ccaf62258357938e
|