Blame view

Field-field correlation/CF4D_H.m 1.99 KB
46cfdbe6   Steve Greedy   Update repository
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
%%4D CF from 'Data_3GHz_1cm.txt'

clear 
clc

%% 1cm 
A = dlmread('Data_3GHz_Hy_probe10_1cm.txt'); %read correlation data from file 
% A(theta,Hx)

L=36; % number of paddle rotation

Hx=(A(:,2));

nx=60;
ny=60;

n=1
for k=1:L    
    for x = 1:nx
        for y = 1:ny
        
        data(x,y,k)=Hx(n);
       
        n=n+1
           
        end
    end
end

for t=1:L
    t
    for x1=1:nx
        for y1=1:ny
            for x2=1:nx
                for y2=1:ny
                     
                    CF(x1,y1,x2,y2,t)=data(x1,y1,t)*conj(data(x2,y2,t));
        
                end
            end
        end
    end
end

for x1=1:nx
    x1
    for y1=1:ny
        for x2=1:nx
            for y2=1:ny
                     
                    R1(x1,y1,x2,y2)=mean(squeeze(CF(x1,y1,x2,y2,:))); % CF4D = R(x1,y1,x2,y2)
            
            end
        end
    end
end

figure
imagesc(squeeze(abs((R1(30,30,:,:))))'); %CF2(x1,y1,x2,y2)
title('3GHz - 4D CF(y1,x1,30,30) probe10 at 1cm')
set(gca,'YDir','normal')
colormap('jet');

%% 10cm 
A = dlmread('Data_3GHz_Hy_probe10_10cm.txt'); %read correlation data from file 
% A(theta,Hx)

%L=1; % number of paddle rotation

Hx=(A(:,2));

nx=60;
ny=60;

n=1
for k=1:L    
    for x = 1:nx
        for y = 1:ny
        
        data(x,y,k)=Hx(n);
       
        n=n+1
           
        end
    end
end

for t=1:L
    t
    for x1=1:nx
        for y1=1:ny
            for x2=1:nx
                for y2=1:ny
                     
                    CF(x1,y1,x2,y2,t)=data(x1,y1,t)*conj(data(x2,y2,t));
        
                end
            end
        end
    end
end

for x1=1:nx
    x1
    for y1=1:ny
        for x2=1:nx
            for y2=1:ny
                     
                    R3(x1,y1,x2,y2)=mean(squeeze(CF(x1,y1,x2,y2,:))); % CF4D = R(x1,y1,x2,y2)
            
            end
        end
    end
end

figure
imagesc(squeeze(abs((R3(30,30,:,:))))'); %CF2(x1,y1,x2,y2)
title('3GHz - 4D CF(y1,x1,30,30) probe10 at 10cm')
set(gca,'YDir','normal')
colormap('jet');