From 2381479b2a45ac4931c972d467f1face9fb55bb6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 16 Nov 2023 14:04:48 +0100 Subject: Julia: Set profile radius and mosaicity for Crystal --- julia/CrystFEL/src/crystal.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/julia/CrystFEL/src/crystal.jl b/julia/CrystFEL/src/crystal.jl index 9e222554..1c0143e2 100644 --- a/julia/CrystFEL/src/crystal.jl +++ b/julia/CrystFEL/src/crystal.jl @@ -13,7 +13,7 @@ mutable struct Crystal end -function Crystal(cell::UnitCell) +function Crystal(cell::UnitCell; profileradius=2e6, mosaicity=0) out = ccall((:crystal_new, libcrystfel), Ptr{InternalCrystal}, ()) @@ -26,6 +26,14 @@ function Crystal(cell::UnitCell) Cvoid, (Ptr{InternalCrystal},Ptr{InternalUnitCell}), out, cell.internalptr) + ccall((:crystal_set_profile_radius, libcrystfel), + Cvoid, (Ptr{InternalCrystal},Cdouble), + out, profileradius) + + ccall((:crystal_set_mosaicity, libcrystfel), + Cvoid, (Ptr{InternalCrystal},Cdouble), + out, mosaicity) + cr = Crystal(out) finalizer(cr) do x -- cgit v1.2.3