aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-11-16 10:12:07 +0100
committerThomas White <taw@physics.org>2024-02-06 16:59:34 +0100
commit2662f07afb9fbfe82c01cd110903d8afff3f8395 (patch)
tree1581f7f3763fe082f1a733ecde0d7c225a0ef0b1
parent46077543748be731ea53d115cb26bc1c9e489914 (diff)
Julia: Run the indexer pipeline
-rw-r--r--julia/CrystFEL/src/CrystFEL.jl2
-rw-r--r--julia/CrystFEL/src/indexing.jl12
-rw-r--r--julia/alignment-test.jl2
3 files changed, 13 insertions, 3 deletions
diff --git a/julia/CrystFEL/src/CrystFEL.jl b/julia/CrystFEL/src/CrystFEL.jl
index 33ca75a8..11de649a 100644
--- a/julia/CrystFEL/src/CrystFEL.jl
+++ b/julia/CrystFEL/src/CrystFEL.jl
@@ -57,6 +57,6 @@ export predictreflections
include("indexing.jl")
using .Indexing
-export Indexer
+export Indexer, index
end # of module
diff --git a/julia/CrystFEL/src/indexing.jl b/julia/CrystFEL/src/indexing.jl
index 862fdaec..aad9847a 100644
--- a/julia/CrystFEL/src/indexing.jl
+++ b/julia/CrystFEL/src/indexing.jl
@@ -2,7 +2,8 @@ module Indexing
import ..CrystFEL: libcrystfel
import ..CrystFEL.UnitCells: UnitCell, InternalUnitCell
-export Indexer
+import ..CrystFEL.Images: Image, InternalImage
+export Indexer, index
mutable struct IndexingPriv end
@@ -81,4 +82,13 @@ function Indexer(methods, cell; tolerances=(0.05,0.05,0.05,1.5,1.5,1.5),
end
+function index(image::Image, idxr::Indexer)
+ @ccall libcrystfel.index_pattern_4(image.internalptr::Ptr{InternalImage},
+ idxr.indexingpriv::Ptr{IndexingPriv},
+ C_NULL::Ptr{Cvoid},
+ C_NULL::Ptr{Cvoid},
+ C_NULL::Ptr{Cvoid})::Cvoid
+end
+
+
end # of module
diff --git a/julia/alignment-test.jl b/julia/alignment-test.jl
index 0e9ef170..df0bb03e 100644
--- a/julia/alignment-test.jl
+++ b/julia/alignment-test.jl
@@ -21,5 +21,5 @@ for refl in truth
end
# Index the pattern
-indexer = Indexing("asdf-cell", cell, retry=false, multilattice=false, refine=true)
+indexer = Indexer("asdf-cell", cell, retry=false, multilattice=false, refine=true)
index(image, indexer)