choose_grid#
- anri.index.choose_grid(ops, B, rings, geom, lit, max_chance=0.5, steps=(3.0, 2.5, 2.0, 1.5, 1.0), n_sample=16384, seed=0, log=<built-in function print>)[source]#
Choose the coarsest grid step whose chance completeness is at most max_chance.
Chance completeness is the median completeness over a random sample of the grid: most grid orientations are wrong. A coarser grid has larger tolerances, so more chance matches. If no step qualifies, the finest is used.
- Parameters:
ops (
Array|ndarray|bool|number|bool|int|float|complex) – [n, 3, 3] Laue-group rotationsB (
Array|ndarray|bool|number|bool|int|float|complex) – Seecompleteness_of()rings (
dict) – Seecompleteness_of()geom (
dict) – Seecompleteness_of()lit (
dict) – Seecompleteness_of()max_chance (
float, default:0.5) – Largest acceptable chance completenesssteps (
tuple, default:(3.0, 2.5, 2.0, 1.5, 1.0)) – Grid steps to try (degrees), coarsest firstn_sample (
int, default:16384) – Orientations sampled per stepseed (
int, default:0) – Random seed for the samplelog (
Callable, default:<built-in function print>) – Progress messages
- Returns:
float– Grid step in degrees