-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_nfw_shears.m
executable file
·48 lines (41 loc) · 1.06 KB
/
test_nfw_shears.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
addpath(genpath('~/code/gravlens/'))
data = load('test_nfw_data_gravlenspy.txt');
theta_x = data(:,3);
theta_y = data(:,4);
M_200=4.7779e+14
conc=4.28229095326
theta_cx=15
theta_cy=0
zclust= 0.257707923651
zsource=1
Omega_m=0.271
[gamma_1 gamma_2 kappa mod_gamma rho_s r_s] = nfwshears(theta_x,theta_y,M_200,conc,theta_cx,theta_cy,zclust,zsource,Omega_m);
g1_py = data(:,1);
g2_py = data(:,2);
theta_x__1=theta_x(1)
theta_y__1=theta_y(1)
subplot(3,2,1);
scatter(theta_x,theta_y,70,gamma_1,'filled');
title('gravlens matlab')
colorbar;
subplot(3,2,2);
scatter(theta_x,theta_y,70,gamma_2,'filled');
title('gravlens matlab')
colorbar;
subplot(3,2,3);
scatter(theta_x,theta_y,70,g1_py,'filled');
title('python gravlens')
colorbar;
subplot(3,2,4);
scatter(theta_x,theta_y,70,g2_py,'filled');
title('python gravlens')
colorbar;
subplot(3,2,5);
scatter(theta_x,theta_y,70,g1_py./gamma_1,'filled');
title('python / matlab ')
colorbar;
subplot(3,2,6);
scatter(theta_x,theta_y,70,g2_py./gamma_2,'filled');
title('python / matlab')
colorbar;
disp 'now check the plot if its the same'