score
score(ubi, gv, tol)
Categories: Indexing, Scattering geometry
Layout: gv accepts (ng,3) AoS or (3,ng) SoA See AoS/SoA guide.
Description
takes a ubi matrix and list of g-vectors and computes hkl = dot(ubi, gv), then rounds these g-vectors to integer and computes drlv2 = (h-int(h))2 + (k-int(k))2 + (l-int(l))**2 If drlv2 is less than tol*tol then the peak is considered to be indexed. Returns the number of peaks found.
Parameters
| Name | Description |
|---|---|
gv |
G-vectors array, shape (ng, 3) flattened. |
tol |
Tolerance on |
ubi |
Orientation matrix UBI (UB inverse), shape (9,) flattened double. |
Constraints
ubi.format == 'd'ubi.n == 9gv.ndim == 2
Overloads
| C function | Condition |
|---|---|
score_f64_soa_avx512 |
f64 SoA AVX-512 |
score_f64_avx512 |
f64 AoS AVX-512 |
score_f32_soa_avx512 |
f32 SoA AVX-512 |
score_f32_avx512 |
f32 AoS AVX-512 |
score_f64_soa_avx2 |
f64 SoA AVX2 |
score_f64_avx2 |
f64 AoS AVX2 |
score_f32_soa_avx2 |
f32 SoA AVX2 |
score_f32_avx2 |
f32 AoS AVX2 |
score |
f64 AoS |
score_f32 |
f32 AoS |
Performance
Measured on 2026-07-19T09:04:38 (AMD EPYC-Genoa Processor)
| Variant | M_gv_per_s |
|---|---|
| AoS_f32_1T | 1568 |
| AoS_f64_1T | 1123 |
| AoS_f64_nT | 915 |
| SoA_f32_1T | 4034 |
| SoA_f64_1T | 1793 |
| SoA_f64_nT | 1304 |
Built from commit 7ba8255fa8d680e1a1df79e67aee3873247ce69c (v0.4.5)