aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--julia/CrystFEL/src/CrystFEL.jl2
-rw-r--r--julia/CrystFEL/src/cell.jl18
2 files changed, 18 insertions, 2 deletions
diff --git a/julia/CrystFEL/src/CrystFEL.jl b/julia/CrystFEL/src/CrystFEL.jl
index 7aa5b5fe..9ab5d15f 100644
--- a/julia/CrystFEL/src/CrystFEL.jl
+++ b/julia/CrystFEL/src/CrystFEL.jl
@@ -34,7 +34,7 @@ export TetragonalLattice, HexagonalLattice, RhombohedralLattice, CubicLattice
export PrimitiveCell, ACenteredCell, BCenteredCell, CCenteredCell
export BodyCenteredCell, FaceCenteredCell, RhombohedralCell, RhombohedralCellOnHexagonalAxes
export NoUniqueAxis, UnknownUniqueAxis, UniqueAxisA, UniqueAxisB, UniqueAxisC
-export rotatecell
+export rotatecell, compare_reindexed_cell_parameters
include("detgeom.jl")
using .DetGeoms
diff --git a/julia/CrystFEL/src/cell.jl b/julia/CrystFEL/src/cell.jl
index a18810bb..d8e72799 100644
--- a/julia/CrystFEL/src/cell.jl
+++ b/julia/CrystFEL/src/cell.jl
@@ -10,7 +10,7 @@ export TetragonalLattice, HexagonalLattice, RhombohedralLattice, CubicLattice
export PrimitiveCell, ACenteredCell, BCenteredCell, CCenteredCell
export BodyCenteredCell, FaceCenteredCell, RhombohedralCell, RhombohedralCellOnHexagonalAxes
export NoUniqueAxis, UnknownUniqueAxis, UniqueAxisA, UniqueAxisB, UniqueAxisC
-export rotatecell
+export rotatecell, compare_reindexed_cell_parameters
# Represents the real C-side (opaque) structure.
@@ -427,4 +427,20 @@ Equivalent to CrystFEL routine `cell_rotate(uc, random_quaternion(<rng>))`.
rotatecell(uc) = rotatecell(uc, randomquat())
+"""
+ compare_reindexed_cell_parameters(uc, reference, tols)
+
+"""
+function compare_reindexed_cell_parameters(uc, reference, tols)
+ out = @ccall libcrystfel.compare_reindexed_cell_parameters(uc.internalptr::Ptr{InternalUnitCell},
+ reference.internalptr::Ptr{InternalUnitCell},
+ collect(Cdouble,tols)::Ptr{Cdouble},
+ C_NULL::Ptr{Cvoid})::Ptr{InternalUnitCell}
+ if out == C_NULL
+ throw(ErrorException("Cell comparison failed"))
+ end
+ UnitCell(out)
+end
+
+
end # of module