Skip to content

Commit

Permalink
Merge pull request #603 from SasView/602-fcc-paracrystalline-model-fix
Browse files Browse the repository at this point in the history
602: Fix FCC Paracrystal Lattice Parameter Calculation
  • Loading branch information
krzywon authored Jul 17, 2024
2 parents d20724b + a09344e commit 39c41ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sasmodels/models/fcc_paracrystal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fcc_Zq(double qa, double qb, double qc, double dnn, double d_factor)
const double a1 = ( qa + qb)/2.0;
const double a2 = ( qa + qc)/2.0;
const double a3 = ( qb + qc)/2.0;
const double d_a = dnn/sqrt(2);
const double d_a = dnn*sqrt(2);

// Matsuoka 23-24-25
// Z_k numerator: 1 - exp(a)^2
Expand Down
5 changes: 3 additions & 2 deletions sasmodels/models/fcc_paracrystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ def random():
#
# October 26, 2022, PDB fixed unit tests to conform to new maths
# TODO: fix the 2d tests
q = 4.*pi/220.
# Test position of first Bragg Peak at q = 2.0 * pi * np.sqrt(3) / (np.sqrt(2) * 220)
q=0.035
tests = [
[{}, [0.001, q, 0.25], [1.9839734995338474, 0.3352457353010224, 0.005804136688760973]],
[{}, [0.01, q, 0.25], [0.0213498915484313, 69.03586722100925, 0.005713137547083953]],
#[{}, (-0.047, -0.007), 238.103096286],
#[{}, (0.053, 0.063), 0.863609587796],
]

0 comments on commit 39c41ab

Please sign in to comment.