cubic_index — DRIVE pxrd op

• Data kinds: signal × scalar → table

• Call: import fullseye as fs; fs.ledger.cubic_index(two_theta, wavelength, lattices=('P', 'I', 'F', 'diamond'), tolerance=0.05, n_first=6, max_unindexed=0) (to call the implementation directly, import pxrd; pxrd.cubic_index(two_theta, wavelength, lattices=('P', 'I', 'F', 'diamond'), tolerance=0.05, n_first=6, max_unindexed=0); from the registry, opsdrive.get("cubic_index"))

Usage

Indexes the peaks as cubic and determines the lattice (P / I / F / diamond) and the lattice constant a [Å].

Since 1/d² = N / a², it tentatively fixes a by assigning the n_first smallest allowed N to the first peak, assigns every peak to the nearest allowed N, refines a by least squares (assign → refine twice), and keeps only candidates whose calculated and observed 2θ differ by at most tolerance [deg] (if up to max_unindexed peaks are off, they are excluded and the candidate is kept —— so that a single impurity or spurious peak does not discard everything. Excluded peaks are returned in unindexed). Candidates are compared by de Wolff's M-type figure of merit M = Q_last / (2 ε̄ N_calc) (Q = 1/d², ε̄ = mean of |ΔQ|, N_calc = number of calculated lines allowed up to the last observed line) —— P fits anything but M drops due to its many calculated lines. Candidates with excluded peaks are discounted by (指数の付いた割合)⁴ (an empirical weight, to prevent escaping to a lattice with fewer calculated lines by discarding strong peaks).

Return value (dict): lattice, a, a_sigma (standard error from residuals), two_theta (indexed peaks), hkl ((n, 3)), N, residual_deg (observed − calculated), fom, missing (list of N allowed in range but not observed), unindexed (excluded peaks), candidates (summary of all candidates). If no candidate fits, lattice = None (not cubic / peaks misidentified).

Raises ValueError: fewer than 2 peaks / non-finite / outside (0, 180), non-positive wavelength, misspelled lattice.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_pxrd_phase_peel — py -3.11 examples/poc_pxrd_phase_peel.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (pxrd)

cif_read · cubic_prototype · powder_reflections · scherrer_size · debye_ring_image · detector_two_theta · detector_calibrate · azimuthal_integrate


*Provenance: pxrd.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.