-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestSuite_RuCl3.m
66 lines (57 loc) · 1.17 KB
/
testSuite_RuCl3.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
% Test Suite
clear all
close all
%% Test CrSBr
m = RuCl3();
m.numLayer=1;
m.setTitle('');
m.setKzExtent( 3.9*pi/m.lambda )
m.lambda_Ru = 0;
m.setSpotcut(5);
%% Test draw3D
drawRect = true;
m.setkeV(80);
m.setKillZero(2);
m.setIntensityFactor(1);
m.draw3D(true,figure);
%%
m.setIntensityFactor(10)
m.setKzMode('constant');
m.setKzVal( 0);
m.draw2D(figure)
axis equal
view([0,90])
%%
hs = [0 0 -1 -1 -1 -1 1 1 1 1 2 -2]';
ks = [-1 -2 -2 -1 1 2 -2 -1 1 2 -2 -2]';
m.draw3DHK(hs,ks,drawRect,figure);
view([47, 48])
return
%% Test Tilt Pattern
m.setkeV(200);
m.setKillZero(1);
m.setIntensityFactor(1);
t_max= 40;
m.setTiltStart(-t_max*pi/180);
m.setTiltEnd(t_max*pi/180);
m.setTiltN(1024);
m.setTiltAxis(deg2rad(-30));
%displaymode = 'kz';
displaymode = 'angle';
displaypattern = true;
kzmode = 'ewald';
%kzmode = 'constant';
hks = [0, 1; 1, 0; 1, -1; 0, -1; -1, 0];%
% 0, 3; 3, 0; 3, -3; 0, -3; -3, 0; -3, 3];
[tiltrange, I] = m.getTiltSeriesHK(hks(:,1),hks(:,2), kzmode,displaymode, displaypattern, figure);
figure
hold on
axis equal
plot(tiltrange,I,'-');
%%
% Test Side view
m.setKillZero(2);
hs = [1 1 3 ]';
ks = [0 1 0 ]';
xpos = [1:3]';
m.drawSideView(hs,ks,xpos,figure)