From e40d5e6cd2d0b98d700bab42c614f27cfe725d97 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 2 Feb 2024 15:27:25 +0100 Subject: align_detector.jl: Show number of indexed frames --- julia/alignment-test.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/julia/alignment-test.jl b/julia/alignment-test.jl index de4d284b..adaf399e 100644 --- a/julia/alignment-test.jl +++ b/julia/alignment-test.jl @@ -22,6 +22,7 @@ function simulate_and_index(cell, image_true, dtempl_moved, mille, n) indexer = Indexer("asdf", dtempl_moved, cell, retry=false, multilattice=false, refine=true) + nidx = 0 for i in 1:n # Create a diffraction pattern for a random orientation @@ -37,6 +38,10 @@ function simulate_and_index(cell, image_true, dtempl_moved, mille, n) # based on the incorrect geometry index(image_moved, indexer, mille=mille) + if image_moved.n_crystals > 0 + nidx += 1 + end + if i % 100 == 0 print("*") else @@ -46,6 +51,8 @@ function simulate_and_index(cell, image_true, dtempl_moved, mille, n) end println("") + println("Indexed ", nidx, " out of ", n, " frames") + end -- cgit v1.2.3