-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestSuite_CrSBr.m
56 lines (43 loc) · 1.04 KB
/
testSuite_CrSBr.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
% Test Suite
clear all
close all
%% Test CrSBr
m = CrSBr();
m.numLayer=3;
m.setTitle('');
m.setKzExtent( 3.9*pi/m.lambda )
m.setSpotcut(2);
%% Test draw3D
drawRect = true;
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.setKillZero(0);
view([47, 48])
m.setkeV(200);
m.setIntensityFactor(1);
%m.draw3DHK(hs,ks,drawRect,figure);
m.draw3D(true,figure);
%% Test Tilt Pattern
m.setkeV(200);
t_max= 30;
m.setTiltStart(-t_max*pi/180);
m.setTiltEnd(t_max*pi/180);
m.setTiltN(1024);
m.setTiltAxis(deg2rad(0));
%displaymode = 'kz';
displaymode = 'angle';
displaypattern = true;
kzmode = 'ewald';
%kzmode = 'constant';
hks = [1, 1; 1, -1; -1, 1; -1, -1; 2, 0];
%[tiltrange, I] = m.getTiltSeries(kzmode,displaymode, displaypattern, figure);
[tiltrange, I] = m.getTiltSeriesHK(hks(:,1), hks(:,2), kzmode,displaymode, displaypattern, figure);
hold on
%plot(tilts,ydata*1.5,'o');
%%
% Test Side view
m.setKillZero(2);
hs = [-4 -3 -2 -1 0 1 2 3 4]';
ks = [2 2 2 2 2 2 2 2 2]';
xpos = [1:9]';
m.drawSideView(hs,ks,xpos,figure)