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
- Local structure library ("My structures"): remembers CIFs you've loaded on this device, with Recent/Starred/search, and a bundled offline example to try immediately
- Import crystal orientation from diffraction test data
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)
- 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 lattice/sample relative to the goniometer.
- New: Use Import from Diffraction Test to automatically determine Euler angles from known diffraction measurements.
- 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. My structures and Try an example
- Click Structures ▾ next to the CIF area (or File → My structures…) to reopen a previously loaded CIF, without finding the original file again.
- No CIF on hand? Try an example loads a small bundled structure, fully offline.
- Accepted CIFs are remembered automatically on this device (toggle in the picker); removing a saved entry never touches your original file on disk.
5. Changing or resetting the structure
Use the toolbar button or File → Change Structure… to pick a different CIF or start over, returning to the init window.
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.
Contributing
Bug reports, feature requests, and pull requests are welcome — see CONTRIBUTING.md for dev setup, testing, and architecture pointers. This project follows the Contributor Covenant Code of Conduct.
Metadata
Release files for advisor-scattering 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| advisor_scattering-1.1.1.tar.gz | 419.0 kB | Without provenance | Details for advisor_scattering-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| advisor_scattering-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for advisor_scattering-1.1.1-py3-none-any.whl |
Total release size: 875.4 kB
Release files / advisor_scattering-1.1.1.tar.gz
| Download URL | advisor_scattering-1.1.1.tar.gz |
|---|---|
| Size | 419.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84534b492bcb2a44ae3275d689bedfd5b8f7d3cc9e1758c0774bf5fe95f380b7
|
|
BLAKE2b-256 checksum How to use checksums |
0ca35176f57018d5c8ef1d7390d38c9e761c922777e3debbf5ee28911cd322c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / advisor_scattering-1.1.1-py3-none-any.whl
| Download URL | advisor_scattering-1.1.1-py3-none-any.whl |
|---|---|
| Size | 456.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a6d84cc7889efd29aeeee2e88fbb3122bbaec8d899e9381ae197945f8665644
|
|
BLAKE2b-256 checksum How to use checksums |
b4311a1b8e11110cbb36219576113cd60e4f013504577934e81c86490aac8493
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for advisor-scattering 1.1.1
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.