diff options
author | Thomas White <taw@physics.org> | 2023-11-16 10:12:07 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-02-06 16:59:34 +0100 |
commit | 2662f07afb9fbfe82c01cd110903d8afff3f8395 (patch) | |
tree | 1581f7f3763fe082f1a733ecde0d7c225a0ef0b1 | |
parent | 46077543748be731ea53d115cb26bc1c9e489914 (diff) |
Julia: Run the indexer pipeline
-rw-r--r-- | julia/CrystFEL/src/CrystFEL.jl | 2 | ||||
-rw-r--r-- | julia/CrystFEL/src/indexing.jl | 12 | ||||
-rw-r--r-- | julia/alignment-test.jl | 2 |
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) |