Skip to content

Commit

Permalink
fix the sign the spatial envelope functon PTCF to c_Pi*lens.si_theta_…
Browse files Browse the repository at this point in the history
…c*(lens.c_30*lens.lambda2*g2 + lens.c_10);
  • Loading branch information
Ivanlh20 committed Jan 19, 2023
1 parent e7fb492 commit df15c3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*Copy*.cuh
*Copy*.hpp
*Copy*.cpp
*tmp.m
MULTEM_binary
MULTEM_binary.rar
MULTEM_binary.zip
Expand All @@ -22,6 +23,7 @@ mex_examples_general
mex_files_general
src_temporal
mex_test
.vs
bugs
design
build-multem-Desktop_Qt_5_9_0_MSVC2015_64bit-Debug
Expand Down
2 changes: 1 addition & 1 deletion mex_examples_multem/example_MULTEM_STEM.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
, a, b, c, input_multem.spec_dz] = Au110_xtl(na, nb, nc, ncu, rmsd_3d);

%%%%%%%%%%%%%%%%%%%%%% Specimen thickness %%%%%%%%%%%%%%%%%%%%%%%%%%
input_multem.thick_type = 2; % eTT_Whole_Spec = 1, eTT_Through_Thick = 2, eTT_Through_Slices = 3
input_multem.thick_type = 1; % eTT_Whole_Spec = 1, eTT_Through_Thick = 2, eTT_Through_Slices = 3
input_multem.thick = c/2:c:1000; % Array of thickes (�)

%%%%%%%%%%%%%%%%%%%%%% x-y sampling %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
4 changes: 2 additions & 2 deletions src/cgpu_fcns.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -2017,14 +2017,14 @@ namespace mt

if((lens.g2_min <= g2) && (g2 < lens.g2_max))
{
T_r chi = g2*(lens.c_c_30*g2+lens.c_c_10);
T_r chi = g2*(lens.c_c_30*g2 + lens.c_c_10);
T_r c = c_Pi*lens.si_theta_c*lens.ti_iehwgd;
T_r u = 1.0 + c*c*g2;

c = c_Pi*lens.ti_iehwgd*lens.lambda*g2;
T_r temp_inc = 0.25*c*c;

c = c_Pi*lens.si_theta_c*(lens.c_30*lens.lambda2*g2-lens.c_10);
c = c_Pi*lens.si_theta_c*(lens.c_30*lens.lambda2*g2 + lens.c_10);
T_r spa_inc = c*c*g2;

T_r st_inc = exp(-(spa_inc+temp_inc)/u)/sqrt(u);
Expand Down

0 comments on commit df15c3a

Please sign in to comment.