aboutsummaryrefslogtreecommitdiff
path: root/julia
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-02-02 15:27:25 +0100
committerThomas White <taw@physics.org>2024-02-06 16:59:35 +0100
commite40d5e6cd2d0b98d700bab42c614f27cfe725d97 (patch)
treea970332cd525ebeb6ae0156c8521c6a91abb3c37 /julia
parent9f4a4750659732dbe7433fc61fe1d07b5aa05264 (diff)
align_detector.jl: Show number of indexed frames
Diffstat (limited to 'julia')
-rw-r--r--julia/alignment-test.jl7
1 files changed, 7 insertions, 0 deletions
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